A89: Timers?!?!?!
[Prev][Next][Index][Thread]
A89: Timers?!?!?!
I have a question concerning timers. I am using TIGCC.
I have this code that is supposed make a cursor blink but it doesnt seem to
work.......
//begin code snippit
static unsigned char arrow[]=
{ 0xFE, 0x82, 0x44, 0x28, 0x10, 0x0, 0x0, 0x0};//the arrow sprite
OSFreeTimer(USER_TIMER);//free the user timer for use
OSRegisterTimer(USER_TIMER,2*20);//register the user timer for 2 seconds (???)
Sprite8(80,90,8,arrow,LCD_MEM,SPRT_XOR);//put the arrow sprite on the screen
while(!ngetchx())//while no keys are pressed........is this right???
{
if(OSTimerExpired(USER_TIMER))//if the user timer is expired excute the
code
{
OSTimerRestart(USER_TIMER);//
Sprite8(80,90,8,arrow,LCD_MEM,SPRT_XOR);//XOR the sprite to the screen
}//end if
}//end while
//end code snippit
that is the code i have.......but it doesnt work. Can someone help me
please! Thanks in advance!
CalenWakfield
Follow-Ups: