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/attiny1634.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/attiny1634.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/attiny1634.c b/arch/attiny1634.c index d4b3767..0737a81 100644 --- a/arch/attiny1634.c +++ b/arch/attiny1634.c @@ -123,3 +123,9 @@ void reboot() { while (1) {} } +inline void prevent_reboot_loop() { + // prevent WDT from rebooting MCU again + MCUSR &= ~(1<<WDRF); // reset status flag + wdt_disable(); +} + |
