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:
3:122af639cf0b
Parent:
2:c321b5919516
Child:
4:57080d572494
--- a/radio_sx126x.cpp	Tue Jul 17 16:18:06 2018 -0700
+++ b/radio_sx126x.cpp	Mon Jul 23 17:36:57 2018 -0700
@@ -41,8 +41,9 @@
 PacketParams_t Radio::pp;
 RadioModems_t Radio::_m_;
 
-#ifdef TARGET_FF_MORPHO
+#if defined(TARGET_FF_MORPHO) && !defined(TARGET_DISCO_L072CZ_LRWAN1)
     DigitalOut pc3(PC_3);   // debug RX indication, for nucleo boards
+    #define RX_INDICATION       pc3
 #endif /* TARGET_FF_MORPHO */
 
 void Radio::Rx(unsigned timeout)
@@ -67,9 +68,9 @@
         radio.xfer(OPCODE_SET_DIO_IRQ_PARAMS, 8, 0, buf);
     }
 
-#ifdef TARGET_FF_MORPHO
-    pc3 = 1;
-#endif /* TARGET_FF_MORPHO */
+#ifdef RX_INDICATION
+    RX_INDICATION = 1;
+#endif
     if (timeout == 0)
         radio.start_rx(RX_TIMEOUT_CONTINUOUS);
     else
@@ -387,9 +388,9 @@
             RadioEvents->TxDone_topHalf();
         } 
     } else {
-#ifdef TARGET_FF_MORPHO
-        pc3 = 0;
-#endif /* TARGET_FF_MORPHO */
+#ifdef RX_INDICATION
+        RX_INDICATION = 0;
+#endif
     }
 }
 
@@ -398,9 +399,9 @@
     if (!tx) {
         if (RadioEvents->RxTimeout)
             RadioEvents->RxTimeout();
-#ifdef TARGET_FF_MORPHO
-        pc3 = 0;
-#endif /* TARGET_FF_MORPHO */
+#ifdef RX_INDICATION
+        RX_INDICATION = 0;
+#endif
     } // else TODO tx timeout
 }