[RF69] Added digital pin to interrupt macro
This commit is contained in:
parent
f9c7e9e7f5
commit
19028b64e0
1 changed files with 4 additions and 4 deletions
|
@ -250,11 +250,11 @@ int16_t RF69::startReceive() {
|
|||
}
|
||||
|
||||
void RF69::setDio0Action(void (*func)(void)) {
|
||||
attachInterrupt(digitalPinToInterrupt(_mod->getIrq()), func, RISING);
|
||||
attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getIrq()), func, RISING);
|
||||
}
|
||||
|
||||
void RF69::clearDio0Action() {
|
||||
detachInterrupt(digitalPinToInterrupt(_mod->getIrq()));
|
||||
detachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getIrq()));
|
||||
}
|
||||
|
||||
void RF69::setDio1Action(void (*func)(void)) {
|
||||
|
@ -262,14 +262,14 @@ void RF69::setDio1Action(void (*func)(void)) {
|
|||
return;
|
||||
}
|
||||
Module::pinMode(_mod->getGpio(), INPUT);
|
||||
attachInterrupt(digitalPinToInterrupt(_mod->getGpio()), func, RISING);
|
||||
attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()), func, RISING);
|
||||
}
|
||||
|
||||
void RF69::clearDio1Action() {
|
||||
if(_mod->getGpio() != RADIOLIB_NC) {
|
||||
return;
|
||||
}
|
||||
detachInterrupt(digitalPinToInterrupt(_mod->getGpio()));
|
||||
detachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()));
|
||||
}
|
||||
|
||||
int16_t RF69::startTransmit(uint8_t* data, size_t len, uint8_t addr) {
|
||||
|
|
Loading…
Add table
Reference in a new issue