Clean up watchdog impl.
This commit is contained in:
committed by
Richard Wackerbarth
parent
8f16563bbd
commit
b4af4441c5
@ -2,16 +2,13 @@
|
||||
#define WATCHDOG_H
|
||||
|
||||
#include "Marlin.h"
|
||||
#include <avr/wdt.h>
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
// initialize watch dog with a 1 sec interrupt time
|
||||
void watchdog_init();
|
||||
// pad the dog/reset watchdog. MUST be called at least every second after the first watchdog_init or AVR will go into emergency procedures..
|
||||
void watchdog_reset();
|
||||
#else
|
||||
//If we do not have a watchdog, then we can have empty functions which are optimized away.
|
||||
FORCE_INLINE void watchdog_init() {};
|
||||
FORCE_INLINE void watchdog_reset() {};
|
||||
#endif
|
||||
// Initialize watchdog with a 4 second interrupt time
|
||||
void watchdog_init();
|
||||
|
||||
// Reset watchdog. MUST be called at least every 4 seconds after the
|
||||
// first watchdog_init or AVR will go into emergency procedures.
|
||||
inline void watchdog_reset() { wdt_reset(); }
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user