Data Structures | |
| struct | wsfTimer_tag |
| Timer structure. More... | |
Macros | |
| #define | WSF_MS_PER_TICK 10 |
| Default milliseconds per tick rate. More... | |
Typedefs | |
| typedef uint32_t | wsfTimerTicks_t |
| Timer ticks data type. More... | |
| typedef struct wsfTimer_tag | wsfTimer_t |
| Timer structure. More... | |
Functions | |
| void | WsfTimerInit (void) |
| Initialize the timer service. This function should only be called once upon system initialization. More... | |
| void | WsfTimerStartSec (wsfTimer_t *pTimer, wsfTimerTicks_t sec) |
| Start a timer in units of seconds. Before this function is called parameter pTimer->handlerId must be set to the event handler for this timer and parameter pTimer->msg must be set to any application-defined timer event parameters. More... | |
| void | WsfTimerStartMs (wsfTimer_t *pTimer, wsfTimerTicks_t ms) |
| Start a timer in units of milliseconds. More... | |
| void | WsfTimerStop (wsfTimer_t *pTimer) |
| Stop a timer. More... | |
| void | WsfTimerUpdate (wsfTimerTicks_t ticks) |
| Update the timer service with the number of elapsed ticks. This function is typically called only from timer porting code. More... | |
| wsfTimerTicks_t | WsfTimerNextExpiration (uint8_t *pTimerRunning) |
| Return the number of ticks until the next timer expiration. Note that this function can return zero even if a timer is running, indicating the timer has expired but has not yet been serviced. More... | |
| wsfTimer_t * | WsfTimerServiceExpired (wsfTaskId_t taskId) |
| Service expired timers for the given task. This function is typically called only WSF OS porting code. More... | |
| void | WsfTimerSleep (void) |
| Check if there is an active timer and if there is enough time to go to sleep. More... | |
| void | WsfTimerSleepUpdate (void) |
| Update WSF timer based on elapsed RTC ticks. More... | |
| #define WSF_MS_PER_TICK 10 |
Default milliseconds per tick rate.
Definition at line 42 of file wsf_timer.h.
| typedef struct wsfTimer_tag wsfTimer_t |
Timer structure.
| typedef uint32_t wsfTimerTicks_t |
Timer ticks data type.
Definition at line 50 of file wsf_timer.h.
| void WsfTimerInit | ( | void | ) |
Initialize the timer service. This function should only be called once upon system initialization.
| wsfTimerTicks_t WsfTimerNextExpiration | ( | uint8_t * | pTimerRunning | ) |
Return the number of ticks until the next timer expiration. Note that this function can return zero even if a timer is running, indicating the timer has expired but has not yet been serviced.
| pTimerRunning | Returns TRUE if a timer is running, FALSE if no timers running. |
| wsfTimer_t* WsfTimerServiceExpired | ( | wsfTaskId_t | taskId | ) |
Service expired timers for the given task. This function is typically called only WSF OS porting code.
| taskId | OS Task ID of task servicing timers. |
| void WsfTimerSleep | ( | void | ) |
Check if there is an active timer and if there is enough time to go to sleep.
| void WsfTimerSleepUpdate | ( | void | ) |
Update WSF timer based on elapsed RTC ticks.
| void WsfTimerStartMs | ( | wsfTimer_t * | pTimer, |
| wsfTimerTicks_t | ms | ||
| ) |
Start a timer in units of milliseconds.
| pTimer | Pointer to timer. |
| ms | Milliseconds until expiration. |
| void WsfTimerStartSec | ( | wsfTimer_t * | pTimer, |
| wsfTimerTicks_t | sec | ||
| ) |
Start a timer in units of seconds. Before this function is called parameter pTimer->handlerId must be set to the event handler for this timer and parameter pTimer->msg must be set to any application-defined timer event parameters.
| pTimer | Pointer to timer. |
| sec | Seconds until expiration. |
| void WsfTimerStop | ( | wsfTimer_t * | pTimer | ) |
Stop a timer.
| pTimer | Pointer to timer. |
| void WsfTimerUpdate | ( | wsfTimerTicks_t | ticks | ) |
Update the timer service with the number of elapsed ticks. This function is typically called only from timer porting code.
| ticks | Number of ticks since last update. |