set the IRQ pin
| 648 | |
| 649 | // set the IRQ pin |
| 650 | bool RFM69::setIrq(uint8_t newIRQPin) { |
| 651 | uint8_t _newInterruptNum = digitalPinToInterrupt(newIRQPin); |
| 652 | if (_newInterruptNum == (uint8_t)NOT_AN_INTERRUPT) return false; |
| 653 | #ifdef RF69_ATTACHINTERRUPT_TAKES_PIN_NUMBER |
| 654 | _newInterruptNum = newIRQPin; |
| 655 | #endif |
| 656 | |
| 657 | // disconnect from existing IRQ pin |
| 658 | detachInterrupt( _interruptNum ); |
| 659 | _interruptNum = _newInterruptNum; |
| 660 | attachInterrupt(_interruptNum, RFM69::isr0, RISING); |
| 661 | return true; |
| 662 | } |
| 663 | |
| 664 | // for debugging |
| 665 | #define REGISTER_DETAIL 0 |
nothing calls this directly
no outgoing calls
no test coverage detected