aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/Watchdog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Watchdog.h')
-rw-r--r--src/drivers/Watchdog.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/drivers/Watchdog.h b/src/drivers/Watchdog.h
new file mode 100644
index 00000000..da192d9e
--- /dev/null
+++ b/src/drivers/Watchdog.h
@@ -0,0 +1,17 @@
+#pragma once
+
+namespace Pinetime {
+ namespace Drivers {
+ class Watchdog {
+ public:
+ enum class ResetReasons { ResetPin, Watchdog, SoftReset, CpuLockup, SystemOff, LpComp, DebugInterface, NFC, HardReset };
+ void Setup(uint8_t timeoutSeconds);
+ void Start();
+ void Kick();
+
+ ResetReasons ResetReason();
+ static const char* ResetReasonToString(ResetReasons reason);
+
+ };
+ }
+}