helper files for t1000e and LR1110

This commit is contained in:
Florent
2025-02-14 09:54:06 +01:00
parent b4ee9ecfb9
commit e16dad778c
4 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#pragma once
#include <RadioLib.h>
#define LR1110_IRQ_HAS_PREAMBLE 0b0000000100 // 4 4 valid LoRa header received
#define LR1110_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
class CustomLR1110 : public LR1110 {
public:
CustomLR1110(Module *mod) : LR1110(mod) { }
bool isReceiving() {
uint16_t irq = getIrqStatus();
bool hasPreamble = ((irq & LR1110_IRQ_HEADER_VALID) && (irq & LR1110_IRQ_HAS_PREAMBLE));
return hasPreamble;
}
};