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:
3:b5052f3fa638
Parent:
0:3b6c2ce051a6
Child:
14:d9340be18c3d
--- a/main.h	Sun Jan 20 16:10:59 2019 +0100
+++ b/main.h	Sun Jan 20 16:12:01 2019 +0100
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 2018 Helmut Tschemernjak
+ * Copyright (c) 2019 Helmut Tschemernjak
  * 30826 Garbsen (Hannover) Germany
-  * Licensed under the Apache License, Version 2.0);
-*/
+ * Licensed under the Apache License, Version 2.0);
+ */
 
 #include "mbed.h"
 #include "PinMap.h"
@@ -10,8 +10,22 @@
 #ifdef FEATURE_USBSERIAL
 #include "USBSerialBuffered.h"
 #endif
-#include "GenericPingPong.h"
+#include "arch.h"
+#include "mbed-util.h"
+
 
+enum InterrruptDevice {
+    INT_BUTTON1 = 0x01,	// user button
+    INT_UNUSED1 = 0x02,
+    INT_UNUSED2 = 0x04,
+    INT_LORA    = 0x08,	// LoRa needs to stay on 0x08
+	INT_TIMEOUT	= 0x10, // Low power timer timeout
+};
+
+extern volatile uint32_t PendingInterrupts;
+extern void InterrruptMSG(enum InterrruptDevice irqid);
+extern uint32_t readclrPendingInterrupts(void);
+extern uint32_t readPendingInterrupts(void);
 
 extern BufferedSerial *ser;
 #ifdef FEATURE_USBSERIAL
@@ -20,7 +34,8 @@
 extern bool _useDprintf;
 extern void InitSerial(int timeout, DigitalOut *led);  
 extern void dump(const char *title, const void *data, int len, bool dwords = false);
+extern const char *BatterySource(void);
 
 extern void dprintf(const char *format, ...) __attribute__((format(printf,1,2)));
 extern void rprintf(const char *format, ...) __attribute__((format(printf,1,2)));
-extern void VAprintf(bool timstamp, bool newline, bool printEnabled, const char *format, va_list arg);
\ No newline at end of file
+extern void VAprintf(bool timstamp, bool newline, bool printEnabled, const char *format, va_list arg);