mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added LLCC68 module support
This commit is contained in:
parent
6e708dc0ec
commit
7ed2b17b35
2 changed files with 37 additions and 0 deletions
16
src/helpers/CustomLLCC68.h
Normal file
16
src/helpers/CustomLLCC68.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <RadioLib.h>
|
||||
|
||||
#define SX126X_IRQ_HEADER_VALID 0b0000010000 // 4 4 valid LoRa header received
|
||||
|
||||
class CustomLLCC68 : public LLCC68 {
|
||||
public:
|
||||
CustomLLCC68(Module *mod) : LLCC68(mod) { }
|
||||
|
||||
bool isReceiving() {
|
||||
uint16_t irq = getIrqStatus();
|
||||
bool hasPreamble = (irq & SX126X_IRQ_HEADER_VALID);
|
||||
return hasPreamble;
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue