User`s manual

Table Of Contents
Watchdog Timer 73
NuPRO-935A
Appendix A - Watchdog Timer
A sample program for configuring the NuPRO-935A’s watchdog
timer is included on the ADLINK All-in-One DVD in the following
directory: \NuPRO\NuPRO-935A\WDT.
A.1 Sample Code
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<dos.h>
void WDTRUN(int config_port,int count_value);
void Enter_IT8718_Config(int config_port);
void Exit_IT8718_Config(int config_port);
void main(int argc,char *argv[])
{
int number,DevID1,DevID2,chipflag=0;
int ioport = 0x2E;//Default config_port = 0x2E
if((argc==1) || ((argc == 3) && (*argv[2] !=
'4') && (*argv[3] != 'E')) || (argc>3))
{
printf("ADLINK Watchdog Timer Utility
of NuPRO-935A\n\n");
printf(" Usage: ITE8718 value
[4E]\n");
printf(" value: 1 to 15300
second.\n");
printf(" Write 0 will disable
watchdog timer.\n\n");
printf(" 4E - change IO port to
0x4E. Default is 0x2E.\n");
exit(1);
}
else
{
// User selected io port.
if(argc==3) { ioport=0x4E;
printf("IOPORT Usage:0x4E
\n");
}