Timers managment ?

Posted by Nobody/Anonymous on June 23, 2005
How I can manage timers with FREERTOS?. For example, I need to wake up a task if an event arrived or if the the timer is finish

if(message == MAS1)
///
else if (Timer1 == FINISH)
///...///
else if (Timer2 == FINISH)

RE: Timers managment ?

Posted by Nobody/Anonymous on June 23, 2005
Have the task wait on a queue/semaphore with a timeout? If the event occurs then the queue/semaphore makes the task unblock. If the event does not occur then the timeout (timer) makes the task unblock.

----- or

Have the task bock indefinately on a queue. If the event occurs then a message is posted onto the queue telling the task what the event was. If the time out occurs then a message is posted onto the queue to tell the task that there was a time out (just another event type really).

----- or

Modify the code to do what you want ;-)