Hardware Abstraction Layer, permitting any LoRa application to use any LoRa radio chip

Dependents:   simple_tx alarm_slave alarm_master lora_p2p ... 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 NAmote72 or Murata discovery, then you must import only sx127x driver.

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Thu Dec 06 17:57:21 2018 -0800
Parent:
7:ba81f66e56d1
Child:
9:97a6de3dbc86
Commit message:
sx127x clear old interrupt on startup

Changed in this revision

radio_sx127x.cpp Show annotated file Show diff for this revision Revisions of this file
radio_sx128x.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/radio_sx127x.cpp	Wed Dec 05 15:04:48 2018 -0800
+++ b/radio_sx127x.cpp	Thu Dec 06 17:57:21 2018 -0800
@@ -233,6 +233,9 @@
 
 void Radio::Init(const RadioEvents_t* e)
 {
+    while (radio.dio0.read() || radio.dio1.read()) {
+        radio.write_reg(REG_LR_IRQFLAGS, 0xff); // clear stagnant interrupt
+    }
     dio0.rise(dio0isr);
     dio1.rise(dio1isr);
 
--- a/radio_sx128x.cpp	Wed Dec 05 15:04:48 2018 -0800
+++ b/radio_sx128x.cpp	Thu Dec 06 17:57:21 2018 -0800
@@ -381,7 +381,7 @@
 
 void Radio::SetPublicNetwork(bool en)
 {
-    uint16_t ppg;
+/*    uint16_t ppg;
 
     if (en)
         ppg = 0x3444;
@@ -389,6 +389,7 @@
         ppg = 0x1424;
 
     radio.writeReg(REG_ADDR_LORA_SYNC, ppg, 2);
+*/
 }
 
 uint32_t Radio::lora_toa_us( uint8_t pktLen )