mirror of https://github.com/meshcore-dev/MeshCore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
482 B
17 lines
482 B
#pragma once
|
|
|
|
#include <RadioLib.h>
|
|
|
|
#define SX126X_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
|
|
#define SX126X_IRQ_PREAMBLE_DETECTED 0x04
|
|
|
|
class CustomLLCC68 : public LLCC68 {
|
|
public:
|
|
CustomLLCC68(Module *mod) : LLCC68(mod) { }
|
|
|
|
bool isReceiving() {
|
|
uint16_t irq = getIrqFlags();
|
|
bool detected = (irq & SX126X_IRQ_HEADER_VALID) || (irq & SX126X_IRQ_PREAMBLE_DETECTED);
|
|
return detected;
|
|
}
|
|
};
|