Hardware Abstraction Layer, permitting any LoRa application to use any LoRa radio chip
Dependents: alarm_slave alarm_master lora_p2p lorawan1v1 ... more
radio chip selection
Radio chip driver is not included, allowing choice of radio device.
If you're using SX1272 or SX1276, then import sx127x driver into your program.
if you're using SX1261 or SX1262, then import sx126x driver into your program.
if you're using SX1280, then import sx1280 driver into your program.
if you're using LR1110, then import LR1110 driver into your program.
If you're using NAmote72 or Murata discovery, then you must import only sx127x driver.
If you're using Type1SJ select target DISCO_L072CZ_LRWAN1
and import sx126x driver into your program.
Pin assigned to arduino LoRa radio shield form-factor
- SX1272 shield.
- SX1276 shield.
- SX126x kit with color touch screen, or sx126x radio-only shield.
- Exceptions with their own pin assignments: NAMote-72 and Murata discovery board.
- TODO: pin assign XDOT.
Diff: radio.h
- Revision:
- 17:5f34cbe2ac53
- Parent:
- 15:e1c04ec39aa4
- Child:
- 18:78c5e644d37a
--- a/radio.h Wed Oct 30 12:50:54 2019 -0700 +++ b/radio.h Mon Jun 01 15:59:56 2020 -0700 @@ -85,7 +85,6 @@ static float GetRssiInst(void); static void Init(const RadioEvents_t*, unsigned spiHz=1000000); static int Send(uint8_t size, timestamp_t maxListenTime, timestamp_t channelFreeTime, int rssiThresh); - //static void PrintStatus(void); static void service(void); static uint32_t lora_toa_us(uint8_t pktLen); static volatile us_timestamp_t irqAt; @@ -102,7 +101,12 @@ static void set_tx_dbm(int8_t dbm); +#ifdef DEVICE_LPTICKER static LowPowerTimer lpt; +#else + static Timer lpt; +#endif + #ifdef SX127x_H static SX127x radio; static SX127x_lora lora; @@ -121,6 +125,13 @@ static unsigned nSymbs; static unsigned rxTimeoutMs; static SX128x radio; +#elif defined(SX1265_H) + static SX1265 radio; + static void dio9_top_half(void); + static void timeout_callback(bool); + static void rx_done(uint8_t, float, float); + static void txDoneBottom(void); + static uint8_t loraTimeoutSymbols; #else #error import radio driver library #endif