2012-06-02 20:44:17 +02:00
|
|
|
#ifndef WATCHDOG_H
|
|
|
|
#define WATCHDOG_H
|
2012-11-06 12:06:41 +01:00
|
|
|
|
2011-12-22 12:38:50 +01:00
|
|
|
#include "Marlin.h"
|
2011-11-06 15:10:29 +01:00
|
|
|
|
2012-11-06 12:06:41 +01:00
|
|
|
#ifdef USE_WATCHDOG
|
2014-02-17 11:58:36 +01:00
|
|
|
// initialize watch dog with a 1 sec interrupt time
|
2012-11-06 12:06:41 +01:00
|
|
|
void watchdog_init();
|
2014-02-17 11:58:36 +01:00
|
|
|
// pad the dog/reset watchdog. MUST be called at least every second after the first watchdog_init or AVR will go into emergency procedures..
|
2012-11-06 12:06:41 +01:00
|
|
|
void watchdog_reset();
|
2011-11-06 19:23:08 +01:00
|
|
|
#else
|
2012-11-06 12:06:41 +01:00
|
|
|
//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() {};
|
2011-11-06 19:23:08 +01:00
|
|
|
#endif
|
2011-11-06 14:58:12 +01:00
|
|
|
|
|
|
|
#endif
|