44
printf("read input input value %d\n",InterDigitalInput());
getch();
}
void
W75IO_WDT()
{
/* get WDT timer value*/
int
value;
printf("Please enter WatchDog Timer value (0-255)\n");
cin>>value;
/* check value */
int
timer=value;
if
(timer > 255)
{
printf("must be > 255\n");
getch();
return
;
}
/* sete onboard W75IO use secord as WatchDog Timer unit */
SetInterWDTUnit(FALSE);
/* Enable onboard W75IO WatchDog Timer */
EnableInterWDT(timer);
/* show message... */
for
(
int
i=0;i<timer;i++)
{
printf("the System will reboot after %3d sec ....\n",timer-i);
Sleep(1000);
}
}
int
menu()
{
int
iOption;
/* First clean screen */
system("cls");
/* show demo menu()*/
printf("\n");
printf("----------------------------------
\n");
printf("Sample
W75IO
Demo
Program
\n");
printf("-----------------------------------\n");
printf("1.DI\n");
printf("2.DO\n");
printf("3.WatchDog\n");
printf("4.Exit\n");
printf("-----------------------------------
\n");
printf("Please select demo function(1-4)?");
/* get user select */
cin>>iOption;
return
iOption;
Summary of Contents for MI945A
Page 5: ...DEC 08 2008 2008...