diff options
author | JF <jf@codingfield.com> | 2020-03-03 19:59:01 +0100 |
---|---|---|
committer | JF <jf@codingfield.com> | 2020-03-03 19:59:01 +0100 |
commit | 545636940f68108a361dda85e0e48a240909cf29 (patch) | |
tree | f471cf8f60976ab1fffce747db021e5706bf60c2 /src/drivers/Watchdog.h | |
parent | 79b4f006be8732663706f1177e17e52829eb661f (diff) | |
parent | d2f725ec9bc6d848906b83ca539d873223d74648 (diff) |
Merge branch 'littlevgl'
# Conflicts:
# src/DisplayApp/Screens/Clock.cpp
# src/DisplayApp/Screens/Clock.h
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 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); + + }; + } +} |