joe_her wrote on Tuesday, July 14, 2015:
I have a simple timer call back which just decrements a variable:
int timerx;
// the callback function:
void vTimerCb1Sec( TimerHandle_t pxTimer )
{
timerx–;
}
Now I need to set timerx:
void set1SecTimer(uint32_t val )
{
xTimerStop(xTimers1Sec,10);
timerx = val;
xTimerStart(xTimers1Sec,10);
}
Is it safe to do it without stop and start like this?
void set1SecTimer(uint32_t val )
{
timerx = val;
}
Thanks,
Johanan