|
Page date Mon Feb 21 11:59:34 2011 . | Improve this page |
Timer
Description
Initialize the internal members.
Parameters
:* none
Description
Destroy the custom timer.
== void start(OSTimerTicks_t ticks, bool periodic=false) == Description
Start the timer to trigger an event after the given number of ticks. If periodic is true, the event will periodically be triggered.
Parameters
:* ticks - input, the number of ticks after which the event is triggered
:* periodic - input, if true the event will periodically be triggered
Return value
:* none
Description
Stop a periodic timer after the pending event is completed, i.e. do not reschedule another event. The number of ticks will be set to zero and periodic to false.
Parameters
:* none
Return value
:* none
== void cancel(OSEventWaitReturn_t ret=OSEventWaitReturn::OS_CANCELED) == Description
Cancel the pending event, by notifying it with the given return value.
Parameters
:* ret - input, the event wait return value, used for notifying the pending event
Return value
:* none
== void eventSet(OSEvent_t event, OSEventWaitReturn_t ret=OSEventWaitReturn::OS_VOID) == Description
Set the event, which is going to be triggered by the timer, and the return value.
Parameters
:* event - input, the event which is going to be set
:* ret - input, the return value which is transmitted to the event
Return value
:* none
Description
Wait for the trigger event to occur.
Parameters
:* none
Return value
:* event return value
Description
Return true if the timer is set to periodic mode.
Parameters
:* none
Return value
:* true if the timer is periodic
Description
Return the number of ticks set by start(). If the timer is stopped, the returned value is zero.
Parameters
:* none
Return value
:* the number of ticks set by start
Description
Return the current ticks counter of the associated timer.
Parameters
:* none
Return value
:* the current number of ticks
Description
This is the callback invoked by the timer interrupt. The default action is notify the event programmed by eventSet().
Parameters
:* none
Return value
:* none