Stops listening for interrupts on an input pin @param pin GPIO pin @see attachInterrupt @see noInterrupts @see interrupts @webref
(int pin)
| 413 | * @webref |
| 414 | */ |
| 415 | public static void releaseInterrupt(int pin) { |
| 416 | Thread t = irqThreads.get(pin); |
| 417 | if (t == null) { |
| 418 | return; |
| 419 | } |
| 420 | |
| 421 | t.interrupt(); |
| 422 | try { |
| 423 | t.join(); |
| 424 | } catch (InterruptedException e) { |
| 425 | System.err.println("Error joining thread in releaseInterrupt: " + e.getMessage()); |
| 426 | } |
| 427 | t = null; |
| 428 | irqThreads.remove(pin); |
| 429 | |
| 430 | disableInterrupt(pin); |
| 431 | } |
| 432 | |
| 433 | |
| 434 | /** |
nothing calls this directly
no test coverage detected