Exemplo n.º 1
0
/**
 * @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();
}
Exemplo n.º 2
0
static THD_FUNCTION(ThreadWdg, arg)
{
    (void)arg;
    chRegSetThreadName("Watchdog");

    while (true)
    {
        wdgResetI(&WDGD1);
        chThdSleepMilliseconds(200);
    }

    return;
}