diff options
| author | Selene ToyKeeper | 2023-11-02 17:16:25 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-11-02 17:16:25 -0600 |
| commit | 7cb4fe0944b839f28dfd96a88a772cd6a8b58019 (patch) | |
| tree | 8d3b203f1650edc28b1f67e1589e3bc870b33fa6 /fsm/wdt.h | |
| parent | added LICENSE (GPLv3) (diff) | |
| download | anduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.tar.gz anduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.tar.bz2 anduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.zip | |
reorganized project files (part 1)
(just moved files, didn't change the contents yet,
and nothing will work without updating #includes and build scripts and stuff)
Diffstat (limited to 'fsm/wdt.h')
| -rw-r--r-- | fsm/wdt.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fsm/wdt.h b/fsm/wdt.h new file mode 100644 index 0000000..abf34c5 --- /dev/null +++ b/fsm/wdt.h @@ -0,0 +1,20 @@ +// fsm-wdt.h: WDT (Watch Dog Timer) functions for SpaghettiMonster. +// Copyright (C) 2017-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#define TICKS_PER_SECOND 62 + +void WDT_on(); +inline void WDT_off(); + +volatile uint8_t irq_wdt = 0; // WDT interrupt happened? + +#ifdef TICK_DURING_STANDBY + #if defined(USE_INDICATOR_LED) || defined(USE_AUX_RGB_LEDS) + // measure battery charge while asleep + #define USE_SLEEP_LVP + #endif +#endif + |
