|
@ -764,11 +764,34 @@ void minkill() { |
|
|
suicide(); |
|
|
suicide(); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
while (1) { |
|
|
#if HAS_KILL |
|
|
#if ENABLED(USE_WATCHDOG) |
|
|
|
|
|
watchdog_reset(); |
|
|
// Wait for kill to be released
|
|
|
#endif |
|
|
while (!READ(KILL_PIN)) { |
|
|
} // Wait for reset
|
|
|
#if ENABLED(USE_WATCHDOG) |
|
|
|
|
|
watchdog_reset(); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Wait for kill to be pressed
|
|
|
|
|
|
while (READ(KILL_PIN)) { |
|
|
|
|
|
#if ENABLED(USE_WATCHDOG) |
|
|
|
|
|
watchdog_reset(); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void(*resetFunc)(void) = 0; // Declare resetFunc() at address 0
|
|
|
|
|
|
resetFunc(); // Jump to address 0
|
|
|
|
|
|
|
|
|
|
|
|
#else // !HAS_KILL
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) { |
|
|
|
|
|
#if ENABLED(USE_WATCHDOG) |
|
|
|
|
|
watchdog_reset(); |
|
|
|
|
|
#endif |
|
|
|
|
|
} // Wait for reset
|
|
|
|
|
|
|
|
|
|
|
|
#endif // !HAS_KILL
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|