kopia lustrzana https://github.com/meshtastic/firmware
Radiolib API Changes
rodzic
d83f8edd54
commit
6fc4a1754b
|
@ -25,7 +25,7 @@ template <class T> 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:
|
||||
/**
|
||||
|
|
|
@ -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 <typename T>
|
||||
SX126xInterface<T>::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||
RADIOLIB_PIN_TYPE busy)
|
||||
|
@ -301,7 +304,7 @@ template <typename T> bool SX126xInterface<T>::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) {
|
||||
|
|
|
@ -25,7 +25,7 @@ template <class T> 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
|
||||
|
|
|
@ -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 <typename T>
|
||||
SX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||
RADIOLIB_PIN_TYPE busy)
|
||||
|
|
|
@ -27,7 +27,7 @@ template <class T> 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:
|
||||
/**
|
||||
|
|
Ładowanie…
Reference in New Issue