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

Revision:
15:e1c04ec39aa4
Parent:
14:94993ae5b164
Parent:
13:a354f82d12d9
Child:
16:34de2ab7eb32
--- a/radio_sx127x.cpp	Wed Sep 11 13:20:21 2019 -0700
+++ b/radio_sx127x.cpp	Wed Sep 11 13:23:37 2019 -0700
@@ -114,14 +114,15 @@
     radio.write_reg(REG_FSK_PACKETCONFIG1, fsk.RegPktConfig1.octet);
 }
 
-void Radio::SetLoRaSymbolTimeout(uint8_t symbs)
+void Radio::SetLoRaSymbolTimeout(uint16_t symbs)
 {
     if (!radio.RegOpMode.bits.LongRangeMode)
         lora.enable();
 
-    lora.RegModemConfig2.sx1272bits.SymbTimeoutMsb = 0;
+    radio.write_reg(REG_LR_SYMBTIMEOUTLSB, symbs & 0xff);
+    symbs >>= 8;
+    lora.RegModemConfig2.sx1272bits.SymbTimeoutMsb = symbs;
     radio.write_reg(REG_LR_MODEMCONFIG2, lora.RegModemConfig2.octet);
-    radio.write_reg(REG_LR_SYMBTIMEOUTLSB, symbs);
 }
 
 void Radio::LoRaModemConfig(unsigned bwKHz, uint8_t sf, uint8_t coderate)
@@ -237,8 +238,10 @@
         RadioEvents->DioPin_top_half();
 }
 
-void Radio::Init(const RadioEvents_t* e)
+void Radio::Init(const RadioEvents_t* e, unsigned spi_hz)
 {
+    radio.m_spi.frequency(spi_hz);
+
     while (radio.dio0.read() || radio.dio1.read()) {
         radio.write_reg(REG_LR_IRQFLAGS, 0xff); // clear stagnant interrupt
     }