Browse Source

SX1262: add PREAMBLE_DETECTED to reported irq flags

pull/3036/head
taco 1 week ago
parent
commit
fae4803158
  1. 5
      src/helpers/radiolib/CustomSX1262.h

5
src/helpers/radiolib/CustomSX1262.h

@ -100,6 +100,11 @@ class CustomSX1262 : public SX1262 {
return true; // success return true; // success
} }
int16_t startReceive() override {
// include the PREAMBLE_DETECTED irq bit in reported flags
return SX1262::startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF, RADIOLIB_IRQ_RX_DEFAULT_FLAGS | (1UL << RADIOLIB_IRQ_PREAMBLE_DETECTED), RADIOLIB_IRQ_RX_DEFAULT_MASK, 0);
}
bool isReceiving() { bool isReceiving() {
uint32_t irq = getIrqFlags(); uint32_t irq = getIrqFlags();
bool preamble = irq & RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED; // bit 2 bool preamble = irq & RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED; // bit 2

Loading…
Cancel
Save