RadioShuttle Lib for the STM32 L4 Heltec Board

Dependents:   Turtle_RadioShuttle

Revision:
0:0c31756924a2
Child:
12:11b2d36e9217
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RadioStatus.h	Wed Feb 06 15:26:48 2019 +0000
@@ -0,0 +1,50 @@
+/*
+ * The file is licensed under the Apache License, Version 2.0
+ * (c) 2019 Helmut Tschemernjak
+ * 30826 Garbsen (Hannover) Germany
+ */
+
+#ifdef ARDUINO_Heltec_WIFI_LoRa_32
+#include <Wire.h>
+#include "SSD1306.h"
+#endif
+
+#ifndef UNUSED
+ #define UNUSED(x) (void)(x)
+#endif
+
+
+class MyRadioStatus : public RadioStatusInterface {
+public:
+   	MyRadioStatus();
+    virtual ~MyRadioStatus();
+    
+    virtual	void TXStart(int AppID, int toStation, int length, int dBm);
+    virtual void TXComplete(void);
+    virtual void RxDone(int size, int rssi, int snr);
+    virtual void RxCompleted(void);
+    virtual void MessageTimeout(int AppID, int toStation);
+    
+    void UpdateDisplay(bool invert);
+private:
+    DigitalOut *ledTX;
+    DigitalOut *ledRX;
+    DigitalOut *ledTimeout;
+    int _totalTX;
+    int _totalRX;
+    int _totalError;
+    int _totalTimeout;
+    bool inverted;
+    
+#ifdef ARDUINO_Heltec_WIFI_LoRa_32
+    SSD1306 *display;
+    DigitalOut *displayReset;
+    char _line1[64];
+    char _line2[64];
+    char _line3[64];
+    char _line4[64];
+    char _line5[64];
+    bool invertedDisplay;
+#endif
+};
+