int quit=0,k;
InitLib();
if(IsResetByWatchDogTimer()) /*test whether the system has been
reset by the WDT*/
Print("reset by WatchDog timer\n\r");
EnableWDT(); /*after callng EnableWDT, Refresh WDT must be called
within 0.8s*/
while(!quit){
if(Kbhit()) {
k=Getch();
if(k=='q') {
Print("quit the program\r\n");
quit=1; /*quit the program*/
}
else {
Print("more than 0.8s has elapsed reset the system\r\n");
Delay(1000); /*There has been a delay for more than 0.8s. Reset
the system*/
}
}
RefreshWDT(); /*Refresh WDT must be called within 0.8s*/
Print("call Refresh WDT\n\r");
}
DisableWDT(); /*Disable the WDT. The system will refresh the WDT*/
Print("Call DisableWDT\n\r");
}
DisableWDT()
Function: Disables the WatchDog timer.
Syntax:
void DisableWDT(void);
Header: #include
”7188xc.h”
Description: See the description for EnableSDT().
Example: Please refer to “EnableWDT()” function for more detailed
information.
RefreshWDT()
Function: Refreshes the WatchDog timer.
Syntax:
void RefreshWDT(void);
Header: #include
”7188xc.h”
Description: See the description for EnableSDT().
Example: Please refer to “EnableWDT()” function for more detailed
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
126
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...