Stops listening for interrupts on an input pin @param pin GPIO pin @see attachInterrupt @see noInterrupts @see interrupts @webref GPIO @webBrief Stops listening for interrupts on an input pin
(int pin)
| 476 | * @webBrief Stops listening for interrupts on an input pin |
| 477 | */ |
| 478 | public static void releaseInterrupt(int pin) { |
| 479 | Thread t = irqThreads.get(pin); |
| 480 | if (t == null) { |
| 481 | return; |
| 482 | } |
| 483 | |
| 484 | t.interrupt(); |
| 485 | try { |
| 486 | t.join(); |
| 487 | } catch (InterruptedException e) { |
| 488 | System.err.println("Error joining thread in releaseInterrupt: " + e.getMessage()); |
| 489 | } |
| 490 | t = null; |
| 491 | irqThreads.remove(pin); |
| 492 | |
| 493 | disableInterrupt(pin); |
| 494 | } |
| 495 | |
| 496 | |
| 497 | /** |
nothing calls this directly
no test coverage detected