/** * @brief Resets WDG's counter. * * @param[in] wdgp pointer to the @p WDGDriver object * * @api */ void wdgReset(WDGDriver *wdgp) { osalDbgCheck(wdgp != NULL); osalSysLock(); osalDbgAssert(wdgp->state == WDG_READY, "not ready"); wdgResetI(wdgp); osalSysUnlock(); }
static THD_FUNCTION(ThreadWdg, arg) { (void)arg; chRegSetThreadName("Watchdog"); while (true) { wdgResetI(&WDGD1); chThdSleepMilliseconds(200); } return; }