From e6909adcb1d44797e097dcf93ee7459276a4516a Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 19 Nov 2023 01:47:40 -0700 Subject: moved prevent_reboot_loop() and some other junk out of fsm/main.c --- arch/attiny1616.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/attiny1616.c') 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(); +} + -- cgit v1.2.3