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:
19:94b5382d3fc6
Parent:
17:5f34cbe2ac53
Child:
20:75635d50262e
--- a/radio_sx127x.cpp	Fri Jun 12 11:27:45 2020 -0700
+++ b/radio_sx127x.cpp	Thu Jun 25 12:39:08 2020 -0700
@@ -41,10 +41,17 @@
 
 void Radio::SetTxContinuousWave(unsigned hz, int8_t dbm, unsigned timeout_us)
 {
-    Radio::SetChannel(hz);
-    /* TODO: fsk enable, set regPacketConfig2.datamode */
+    fsk.enable(true);
+    fsk.RegPktConfig2.word = radio.read_u16(REG_FSK_PACKETCONFIG2);
+    fsk.RegPktConfig2.bits.DataModePacket = 0; // continuous mode
+    radio.write_u16(REG_FSK_PACKETCONFIG2, fsk.RegPktConfig2.word);
+    fsk.set_tx_fdev_hz(0);  // unmodulated carrier, aka dead carrier
+    SetChannel(hz);
     set_tx_dbm(dbm);
-    TxTimeoutEvent.attach_us(SX1272OnTimeoutIrq, timeout_us);
+
+    if (timeout_us != 0)
+        TxTimeoutEvent.attach_us(SX1272OnTimeoutIrq, timeout_us);
+
     radio.set_opmode(RF_OPMODE_TRANSMITTER);
 }