36#define _DEFAULT_SOURCE
72 const int kStackSize = 256;
74 const int kStackSize = 2048;
86static long long watchdog_reset_timer(
void* unused1,
void* unused2)
89 return OS_TIMER_RESTART;
void diewith(uint32_t pattern)
Sets a blinking pattern and never returns.
#define BLINK_DIE_WATCHDOG
Watchdog timeout.
int os_thread_create(os_thread_t *thread, const char *name, int priority, size_t stack_size, void *(*start_routine)(void *), void *arg)
Create a thread.
void reset_watchdog(void)
Resets the watchdog.
static int watchdog_ticks
How many times have we seen the watchdog tick without being fed.
static void * watchdog_thread(void *arg)
Thread running a watchdog.
void start_watchdog(int period_msec)
Starts a watchdog thread that must be reset more often than period_msec.
static int watchdog_period_msec
What is the timeout of the watchdog in milliseconds.
void add_watchdog_reset_timer(int period_msec)
Inserts a timer that will periodically reset the watchdog, thereby practically making the watchdog wa...