void main(void)
{
int quit=0;
Print("\n\rTest the LCD lamp blink using user timer ");
Print("\n\rPress 'q' to quit\n\r");
InitLib(); InitLCD(); /*initial Lib & LCD*/
ClrScrn(); /*clear the LCD screen*/
TimerOpen(); /*open timer function*/
InstallUserTimer(MyTimerFun); /*install and call user timer */
while(!quit){
if(Kbhit() && Getch()=='q') quit=1;
}
TimerClose();
}
InstallUserTimer1C()
Function: Installs a custom timer function on interrupt 0x1c. The
system timer will call int 0x1c at intervals of 55 ms.
Syntax:
void InstallUserTimer1C(void (*fun)(void));
Header: #include
”7188xc.h”
Description: fun: A pointer to the custom function. The function
cannot use an input argument and cannot return a value.
Example: Please refer to “InstallUserTimer()” function for a similar
example.
EnableWDT()
Function: Enables the WatchDog timer.
Syntax:
void EnableWDT(void);
Header: #include
”7188xc.h”
Description: The WatchDog Timer (WDT) is always enabled and will
be continually refreshed by the system Timer ISR. When
a custom program calls EnableWDT(), the system timer
ISR will stop refreshing the WDT, which must then be
performed by calling RefreshWDT() from within the
program, otherwise, the system will be reset by the WDT.
The WDT timeout period is 0.8 seconds for MiniOS7 2.0.
Example:
#include ”7188xc.h”
void main(void)
{
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
125
Summary of Contents for I-7188XC Series
Page 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Page 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Page 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Page 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...