User manual
DELIB API reference |
Seite 30
}
// ----------------------------------------------------
// activate watchdog
DapiWatchdogEnable(handle);
printf("watchdog is activated\n");
printf("Taste für weiter\n");
getch();
// ----------------------------------------------------
// activate watchdog
DapiWatchdogDisable(handle);
printf("watchdog is deactivated\n");
printf("Taste für weiter\n");
getch();
// ----------------------------------------------------
// activate watchdog + retrigger
DapiWatchdogEnable(handle);
DapiWatchdogRetrigger(handle);
printf("watchdog is enabled+retriggered\n");
wd_status=0;
while(!kbhit() && wd_status!=2)
{
wd_status = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_WATCHDOG,
DAPI_SPECIAL_WATCHDOG_GET_STATUS, 0, 0);
wd_counter = DapiSpecialCommand(handle,
DAPI_SPECIAL_CMD_WATCHDOG, DAPI_SPECIAL_WATCHDOG_GET_WD_COUNTER_MSEC, 0, 0);
wd_timeout = DapiSpecialCommand(handle,
DAPI_SPECIAL_CMD_WATCHDOG, DAPI_SPECIAL_WATCHDOG_GET_TIMEOUT_MSEC, 0, 0);
printf("WD-Status=%d * WD-Timeout=%dms * WD-Counter = %dms\n",
wd_status, wd_timeout, wd_counter);
}
if(wd_status==2)
{
printf("status=2 -> Watchdog TIMEOUT !!!!\n");
}
printf("Taste für weiter\n");
getch();
// ----------------------------------------------------
// Modul wieder schliessen
DapiCloseModule(handle);
printf("TASTE für weiter\n");
getch();
return ;
}