Communicate Rx available antenna mode to the Tx (#3039)
[ExpressLRS.git] / src / lib / LR1121Driver / LR1121_hal.h
blobefd08230c03e031798df6120ba93f90983a3443b
1 #pragma once
3 #include "LR1121_Regs.h"
4 #include "LR1121.h"
6 class LR1121Hal
8 public:
9 static LR1121Hal *instance;
11 LR1121Hal();
13 void init();
14 void end();
15 void reset(bool bootloader = false);
17 void ICACHE_RAM_ATTR WriteCommand(uint16_t opcode, SX12XX_Radio_Number_t radioNumber);
18 void ICACHE_RAM_ATTR WriteCommand(uint16_t opcode, uint8_t *buffer, uint8_t size, SX12XX_Radio_Number_t radioNumber);
20 void ICACHE_RAM_ATTR ReadCommand(uint8_t *buffer, uint8_t size, SX12XX_Radio_Number_t radioNumber);
22 bool ICACHE_RAM_ATTR WaitOnBusy(SX12XX_Radio_Number_t radioNumber);
24 static ICACHE_RAM_ATTR void dioISR_1();
25 static ICACHE_RAM_ATTR void dioISR_2();
26 void (*IsrCallback_1)();
27 void (*IsrCallback_2)();
29 private: