MCPcopy Create free account
hub / github.com/LowPowerLab/RFM69 / setIrq

Method setIrq

RFM69.cpp:650–662  ·  view source on GitHub ↗

set the IRQ pin

Source from the content-addressed store, hash-verified

648
649// set the IRQ pin
650bool 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected