Exemple #1
0
/*! \brief  Watchdog thread
*/
static msg_t wdthread(void *arg) {
	uint16_t timeout = *((uint16_t *)arg);
	chRegSetThreadName("iwatchdog");
	while (TRUE) {
		iwdg_lld_reload();
		chThdSleepMilliseconds(timeout);
	}
	return -1;
}
Exemple #2
0
/*! \brief  Watchdog thread
 */
static msg_t Thread_indwatchdog(void *arg) {
	(void)arg;

	chRegSetThreadName("iwatchdog");
	while (TRUE) {
		iwdg_lld_reload();
		chThdSleepMilliseconds(250);
	}
	return -1;
}
Exemple #3
0
/* Use this AFTER ChibiOS threads have started */
void iwdgPostStart(void) {
	iwdg_lld_reload();
	chThdCreateStatic(wa, sizeof(wa), NORMALPRIO, wdthread, &timeout_ms);
}