Hi all
I am working on Mc1321x.
I want to insert a dalay of for example 10 seconds inside the code. I did it as below:
#define mDelayTime_c TmrSeconds(10)
.
.
.
TimeFlag=0;
TMR_StartSingleShotTimer(DelayTimerId,mDelayTime_c,DelayTimerCallBack);
while(TimeFlag==0){}
TimeFlag=0;
.
.
.
void DelayTimerCallBack
(
tmrTimerID_t timerId
)
{
(void) timerId;
TimeFlag=1;
}
All variables are defined as global.
But this code does not work. The problem is that the while loop does not permit timer callback to occur.
what should I do.
Thanks a lot
Added p/n to subject.