I need suggestion that how can I add delay of 10 seconds in Home Appliance application of Zigbee?
I will be thankful if you can guide me. I know there are timers but I am not able to use them to server my purpose.
I think that the software timers are the best solution to generate a delay. Which is the problem with the timers that doesn't serve your purpose?
The software timers needs a callback, this callback is called either periodically or once (depending on the configuration). This callback needs to be defined as listed below:
void GenericTimerCallback(tmrTimerID_t timerID);
It is mandatory to allocate the timer before use it:
tmrTimerID_t timerID = TMR_AllocateTimer();
There is a function to start the timer:
int miliseconds = 10000;
TMR_StartTimer(timerID, gTmrSingleShotTimer_c, TmrMilliseconds(miliseconds), GenericTimerCallback);
The parameter gTmrSingleShotTimer_c can be changed to be gTmrIntervalTimer_c (periodical).
Also, there are another function to stop it.
I recommend you to take a look into the file PLM/Interface/TMR_Interface.h to obtain a better description of these functions and macros.
I hope this helps.
Retrieving data ...