LightwaveRF icon indicating copy to clipboard operation
LightwaveRF copied to clipboard

Use of arduino libraries for pin --> interrupt

Open thigger opened this issue 9 years ago • 1 comments

LwRx was trying to use the wrong interrupt on my Pro Micro (32u4, like Arduino Leonardo). There's a function in the standard libraries to translate pins to interrupts so I've just bunged in this as a replacement for getIntNo and it works like a charm.

Thanks for the library BTW!

/**
   Get Int Number for a Pin
**/
int getIntNo(int pin) {

    return  digitalPinToInterrupt(pin);

}

thigger avatar Dec 14 '15 12:12 thigger

Thanks. That's much cleaner. I have made that change in the repository.

roberttidey avatar Dec 18 '15 14:12 roberttidey