x

Dependents:   20180621_FT813 STM32_180SENSOR_ADC4_RS_Ver2_CommCLD

Revision:
0:aae68a400cf2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WDT.h	Mon Jul 23 12:24:16 2018 +0000
@@ -0,0 +1,31 @@
+#ifndef __WDT__H_
+#define __WDT__H_
+
+// https://developer.mbed.org/users/nbremond/code/Watchdog/docs/tip/Watchdog_8cpp_source.html
+#include "mbed.h"
+
+#define     KR_KEY_RELOAD_VAL   ((uint16_t)0xAAAA)
+#define     KR_KEY_ENABLE_VAL   ((uint16_t)0xCCCC)
+#define     KR_REG_ACCESS_VAL   ((uint16_t)0x5555)
+
+#define ST_NUCLEO
+
+class WDT {
+public:
+
+//    Watchdog() {
+//        wdreset = false; 
+//    }
+
+// Load timeout value in watchdog timer and enable
+    void Configure(float timeout);
+
+// "kick" or "feed" the dog - reset the watchdog timer
+// by writing this required bit pattern
+    void Service();
+    
+//    bool WatchdogCausedReset();
+ 
+};
+
+#endif