mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-08-14 05:09:46 +00:00
SX1262: add PREAMBLE_DETECTED to reported irq flags
This commit is contained in:
@@ -100,6 +100,11 @@ class CustomSX1262 : public SX1262 {
|
||||
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() {
|
||||
uint32_t irq = getIrqFlags();
|
||||
bool preamble = irq & RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED; // bit 2
|
||||
|
||||
Reference in New Issue
Block a user