An example project for the Heltec Turtle LoRa board (STM32L4 and SX1276 chips). The projects is only supported for the Nucleo-L432KC board platform in the mbed online and offline compiler environment. Visit www.radioshuttle.de (choose Turtle board) for instructions. Note that most source files and libraries are open source, however some files especially the RadioShuttle core protocol is copyrighted work. Check header for details.

Dependencies:   mbed BufferedSerial SX1276GenericLib OLED_SSD1306 HELIOS_Si7021 NVProperty RadioShuttle-STM32L4 USBDeviceHT

Revision:
5:c6a960febe80
Parent:
1:56fdc660a26a
Child:
14:d9340be18c3d
--- a/utils.cpp	Sun Jan 20 16:13:11 2019 +0100
+++ b/utils.cpp	Mon Jan 21 11:56:10 2019 +0100
@@ -3,7 +3,9 @@
  * 30826 Garbsen (Hannover) Germany
  */
 #include "main.h"
- 
+
+volatile uint32_t PendingInterrupts;	// global interrupt mask of received interrupts
+
 time_t cvt_date(char const *date, char const *time);
 
 BufferedSerial *ser;
@@ -35,11 +37,16 @@
                 *led = !*led;
             wait_ms(100);
             if (timeout) {
-                if (t.read_ms() >= timeout)
-                    return;
+                if (t.read_ms() >= timeout) {
+					delete usb;
+					usb = NULL;
+					DigitalOut rx(USBRX);
+					rx = 0; // need to turn tx low to avoid floating signal
+                    goto done;
+				}
             }
         }
-        return;
+		goto done;
     } else {
 #else
     {
@@ -48,11 +55,11 @@
         ser->baud(230400);
         ser->format(8);
     }
+done:
     time_t t = cvt_date(__DATE__, __TIME__);
     if (t > time(NULL)) {
         set_time(t);
     }
-
 }
 
 void printTimeStamp()