Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual
Page 74
Advertising

KTD-S0057-I
Page 70 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
for (i = 0; i < WDT_TRIG_TIME; i++)
{
if (write (fd, "\0", 1) != 1)
/* Trigger watchdog */
break;
sleep
(WDT_DELAY);
}
/* Should be reboot after 40 seconds from program start */
if (i >= WDT_TRIG_TIME)
sleep (wdt_time + WDT_MARKUP);
/* Cause a timeout */
else
printf ("Trigger process fails !\n\n");
/* Should never be reached */
write (fd, "V", 1);
/* Magic stop */
close (fd);
/* Deactivates watchdog */
return
0;
}
Advertising
This manual is related to the following products: