Appendix a, Programming watchdog timer – Lanner LEC-3110 User Manual
Page 20
18
Programming Watchdog Timer
Embedded and Industrial Computing
Appendix A
Run_LED (0, 0) ;
Run_LED (1, 0) ;
}
else if (argv[1][0] == ‘3’)
{
WatchDog_Enable (10) ;
while (1)
{
int nLeft = WatchDog_
GetLeft () ;
printf (“WatchDog left
%d seconds \r”, nLeft) ;
} ;
}
else if (argv[1][0] == ‘4’)
{
WatchDog_Enable (0) ;
printf (“Watchdog disabled\n”) ;
}
else
RETMSG
(-1,
“Wrong
argement\n”) ;
return 0 ;
} catch (char *str)
{
printf (“\n”) ;
printf (str) ;
}
catch (...)
{
printf (“\nUnknown Exception\n”) ;
}
}