#include"..\lib\i7188.h" int quit=0; int LedMode=0; int data; unsigned long time; void main(void) { Print("Test functions: LedOn,LedOff,StopWatchStart,StopWatchReadValue\n\r"); Print("and Kbhit,Getch,Putch\n\r"); Print("Press 'q' to quit.\n\r"); TimerOpen(); StopWatchStart(0); LedOff(); while(!quit){ StopWatchReadValue(0,&time); if(time>=500){ StopWatchStart(0); LedMode=!LedMode; if(LedMode) LedOn(); else LedOff(); } if(Kbhit()){ data=Getch(); if(data=='q' || data=='Q') quit=1; else { Putch(data); if(data=='\r') Putch('\n'); } } } TimerClose(); }