diff --git a/src/mesh/LR11x0Interface.h b/src/mesh/LR11x0Interface.h index 11a389d25..9272f43f0 100644 --- a/src/mesh/LR11x0Interface.h +++ b/src/mesh/LR11x0Interface.h @@ -25,7 +25,7 @@ template class LR11x0Interface : public RadioLibInterface /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. virtual bool sleep() override; - bool isIRQPending() override { return lora.getIrqStatus() != 0; } + bool isIRQPending() override { return lora.getIrqFlags() != 0; } protected: /** diff --git a/src/mesh/SX126xInterface.cpp b/src/mesh/SX126xInterface.cpp index 39ffb0ac9..47ac5da07 100644 --- a/src/mesh/SX126xInterface.cpp +++ b/src/mesh/SX126xInterface.cpp @@ -12,6 +12,9 @@ #define SX126X_MAX_POWER 22 #endif +#define RADIOLIB_SX126X_IRQ_RX_DEFAULT \ + RADIOLIB_SX126X_IRQ_RX_DONE | RADIOLIB_SX126X_IRQ_TIMEOUT | RADIOLIB_SX126X_IRQ_CRC_ERR | RADIOLIB_SX126X_IRQ_HEADER_ERR + template SX126xInterface::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy) @@ -301,7 +304,7 @@ template bool SX126xInterface::isActivelyReceiving() // The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet // received and handled the interrupt for reading the packet/handling errors. - uint16_t irq = lora.getIrqStatus(); + uint16_t irq = lora.getIrqFlags(); bool detected = (irq & (RADIOLIB_SX126X_IRQ_HEADER_VALID | RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED)); // Handle false detections if (detected) { diff --git a/src/mesh/SX126xInterface.h b/src/mesh/SX126xInterface.h index f2c861743..b392cd3e4 100644 --- a/src/mesh/SX126xInterface.h +++ b/src/mesh/SX126xInterface.h @@ -25,7 +25,7 @@ template class SX126xInterface : public RadioLibInterface /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. virtual bool sleep() override; - bool isIRQPending() override { return lora.getIrqStatus() != 0; } + bool isIRQPending() override { return lora.getIrqFlags() != 0; } protected: float currentLimit = 140; // Higher OCP limit for SX126x PA diff --git a/src/mesh/SX128xInterface.cpp b/src/mesh/SX128xInterface.cpp index fdb2b9a39..ae5fd6941 100644 --- a/src/mesh/SX128xInterface.cpp +++ b/src/mesh/SX128xInterface.cpp @@ -12,6 +12,10 @@ #define SX128X_MAX_POWER 13 #endif +#define RADIOLIB_SX128X_IRQ_RX_DEFAULT \ + RADIOLIB_SX128X_IRQ_RX_DONE | RADIOLIB_SX128X_IRQ_RX_TX_TIMEOUT | RADIOLIB_SX128X_IRQ_CRC_ERROR | \ + RADIOLIB_SX128X_IRQ_HEADER_ERROR + template SX128xInterface::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy) diff --git a/src/mesh/SX128xInterface.h b/src/mesh/SX128xInterface.h index 3aaf31b1c..f7fd35b25 100644 --- a/src/mesh/SX128xInterface.h +++ b/src/mesh/SX128xInterface.h @@ -27,7 +27,7 @@ template class SX128xInterface : public RadioLibInterface /// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep. virtual bool sleep() override; - bool isIRQPending() override { return lora.getIrqStatus() != 0; } + bool isIRQPending() override { return lora.getIrqFlags() != 0; } protected: /**