diff options
Diffstat (limited to 'src/drivers/Watchdog.h')
| -rw-r--r-- | src/drivers/Watchdog.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/drivers/Watchdog.h b/src/drivers/Watchdog.h new file mode 100644 index 0000000..da192d9 --- /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); + + }; + } +} |
