35 #ifndef WSF_MS_PER_TICK 37 #define WSF_MS_PER_TICK 10 48 typedef struct wsfTimer_tag
wsfTimerTicks_t ticks
number of ticks 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...
struct wsfTimer_tag * pNext
pointer to next timer in queue
uint8_t bool_t
Boolean data type.
void WsfTimerStop(wsfTimer_t *pTimer)
Stop a timer.
unsigned long uint32_t
Unsigned 32-bit value.
uint8_t wsfHandlerId_t
Event handler ID data type.
wsfMsgHdr_t msg
application-defined timer event parameters
wsfHandlerId_t handlerId
event handler for this timer
wsfTimer_t * WsfTimerServiceExpired(wsfTaskId_t taskId)
Service expired timers for the given task. This function is typically called only WSF OS porting code...
void WsfTimerInit(void)
Initialize the timer service. This function should only be called once upon system initialization...
wsfHandlerId_t wsfTaskId_t
Task ID data type.
void WsfTimerStartMs(wsfTimer_t *pTimer, wsfTimerTicks_t ms)
Start a timer in units of milliseconds.
bool_t isStarted
TRUE if timer has been started.
uint32_t wsfTimerTicks_t
Timer ticks data type.
wsfTimerTicks_t WsfTimerNextExpiration(bool_t *pTimerRunning)
Return the number of ticks until the next timer expiration. Note that this function can return zero e...
Software foundation OS API.
Common message structure passed to event handler.
void WsfTimerUpdate(wsfTimerTicks_t ticks)
Update the timer service with the number of elapsed ticks. This function is typically called only fro...