Andrew Boyson / lpc1768

Dependents:   test-lpc1768 oldheating gps motorhome ... more

Revision:
49:d056e2c5c4ee
Child:
50:e90c6aaa2645
diff -r 9784768cdc6c -r d056e2c5c4ee reset/restart.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reset/restart.h	Wed May 08 12:13:37 2019 +0000
@@ -0,0 +1,29 @@
+#include <stdint.h>
+#include <stdbool.h>
+
+extern volatile int  RestartZone;
+extern volatile int  RestartPoint;
+
+extern void Restart(int type);
+
+extern int  RestartGetLastZone (void);
+extern int  RestartGetLastCause(void);
+extern int  RestartGetLastPoint(void);
+
+extern void RestartInit    (void);
+
+extern void RestartCauseToString(int type, int size, char* text);
+#define RESTART_CAUSE_RESET_BUTTON     0
+#define RESTART_CAUSE_SOFTWARE_RESET   1
+#define RESTART_CAUSE_HARD_FAULT       2
+#define RESTART_CAUSE_DEFAULT_HANDLER  3
+#define RESTART_CAUSE_INVALID_DATA     4
+
+extern void RestartZoneToString(int type, int size, char* text);
+#define RESTART_ZONE_NONE     0
+#define RESTART_ZONE_INIT     1
+#define RESTART_ZONE_NET      2
+#define RESTART_ZONE_CLOCK    3
+#define RESTART_ZONE_LOG      4
+#define RESTART_ZONE_LPC1768  5
+#define RESTART_ZONE_DERIVED 10