From 3aae02e4ea7987d17c1e113d068bd6b697e098b0 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 11 May 2020 20:33:02 +0200 Subject: [PATCH] [nRF24] Added digital pin to interrupt macro --- src/modules/nRF24/nRF24.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/nRF24/nRF24.cpp b/src/modules/nRF24/nRF24.cpp index ab6cc6b6..76ce1afd 100644 --- a/src/modules/nRF24/nRF24.cpp +++ b/src/modules/nRF24/nRF24.cpp @@ -104,7 +104,7 @@ int16_t nRF24::receive(uint8_t* data, size_t len) { uint32_t start = micros(); while(digitalRead(_mod->getIrq())) { yield(); - + // check timeout: 15 retries * 4ms (max Tx time as per datasheet) if(micros() - start >= 60000) { standby(); @@ -139,7 +139,7 @@ int16_t nRF24::receiveDirect() { } void nRF24::setIrqAction(void (*func)(void)) { - attachInterrupt(digitalPinToInterrupt(_mod->getIrq()), func, FALLING); + attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getIrq()), func, FALLING); } int16_t nRF24::startTransmit(uint8_t* data, size_t len, uint8_t addr) {