diff options
| author | Selene ToyKeeper | 2023-11-19 01:47:40 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-11-19 01:47:40 -0700 |
| commit | e6909adcb1d44797e097dcf93ee7459276a4516a (patch) | |
| tree | f9cf19bfe6d0d670750fa64a0b9a2e2d166392d9 /arch/attiny1616.c | |
| parent | temporary fix for aux LEDs on avrdd; needs proper refactoring (diff) | |
| download | anduril-e6909adcb1d44797e097dcf93ee7459276a4516a.tar.gz anduril-e6909adcb1d44797e097dcf93ee7459276a4516a.tar.bz2 anduril-e6909adcb1d44797e097dcf93ee7459276a4516a.zip | |
moved prevent_reboot_loop() and some other junk out of fsm/main.c
Diffstat (limited to '')
| -rw-r--r-- | arch/attiny1616.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/attiny1616.c b/arch/attiny1616.c index 3b170bb..a3ead7e 100644 --- a/arch/attiny1616.c +++ b/arch/attiny1616.c @@ -145,3 +145,9 @@ void reboot() { while (1) {} } +inline void prevent_reboot_loop() { + // prevent WDT from rebooting MCU again + RSTCTRL.RSTFR &= ~(RSTCTRL_WDRF_bm); // reset status flag + wdt_disable(); +} + |
