mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
16 lines
No EOL
397 B
C++
16 lines
No EOL
397 B
C++
#pragma once
|
|
|
|
#include <RadioLib.h>
|
|
|
|
#define SX126X_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
|
|
|
|
class CustomSX1262 : public SX1262 {
|
|
public:
|
|
CustomSX1262(Module *mod) : SX1262(mod) { }
|
|
|
|
bool isReceiving() {
|
|
uint16_t irq = getIrqStatus();
|
|
bool hasPreamble = (irq & SX126X_IRQ_HEADER_VALID);
|
|
return hasPreamble;
|
|
}
|
|
}; |