diff options
| author | Selene ToyKeeper | 2019-06-27 02:40:38 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-06-27 02:40:38 -0600 |
| commit | 41fef25bf05bb8fa377c9bcbbc7c0b5858cd20a1 (patch) | |
| tree | 901d6eaac250e2f1bc3a1695536486e16ac83e45 /spaghetti-monster/fsm-main.c | |
| parent | anduril manual: added info about manual memory, 2-level lockout, and aux LED ... (diff) | |
| download | anduril-41fef25bf05bb8fa377c9bcbbc7c0b5858cd20a1.tar.gz anduril-41fef25bf05bb8fa377c9bcbbc7c0b5858cd20a1.tar.bz2 anduril-41fef25bf05bb8fa377c9bcbbc7c0b5858cd20a1.zip | |
added factory reset function to Anduril, and reboot function for FSM
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
| -rw-r--r-- | spaghetti-monster/fsm-main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index 6f74e9b..1c28f5f 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -40,6 +40,11 @@ int main() { // Don't allow interrupts while booting cli(); + #ifdef USE_REBOOT // prevent reboot loops + MCUSR &= ~(1<<WDRF); // reset status flag + wdt_disable(); + #endif + #ifdef HALFSPEED // run at half speed CLKPR = 1<<CLKPCE; |
