wayne roberts / Mbed OS LoRaWAN_singlechannel_endnode

Dependencies:   SX127x sx12xx_hal TSL2561

Revision:
5:c108560af4c3
Parent:
3:aead8f8fdc1f
Child:
10:00997daeb0c0
--- a/radio/sx1272/sx1272.cpp	Fri May 26 19:52:51 2017 +0000
+++ b/radio/sx1272/sx1272.cpp	Fri May 26 23:07:01 2017 +0000
@@ -843,8 +843,15 @@
     return rssi;
 }
 
+extern DigitalOut rx_debug_pin; // from board.cpp
+
 void SX1272::SetOpMode( uint8_t opMode )
 {
+    if (opMode == RF_OPMODE_RECEIVER || opMode == RFLR_OPMODE_RECEIVER_SINGLE)
+        rx_debug_pin = 1;
+    else
+        rx_debug_pin = 0;
+            
     if( opMode == RF_OPMODE_SLEEP )
     {
         SetAntSwLowPower( true );