43 #define WSF_OS_DIAG FALSE 51 #define WSF_TASK_FROM_ID(handlerID) (((handlerID) >> 4) & 0x0F) 54 #define WSF_HANDLER_FROM_ID(handlerID) ((handlerID) & 0x0F) 57 #define WSF_INVALID_TASK_ID 0xFF 60 #if WSF_OS_DIAG == TRUE 61 #define WSF_OS_GET_ACTIVE_HANDLER_ID() WsfActiveHandler 63 #define WSF_OS_GET_ACTIVE_HANDLER_ID() WSF_INVALID_TASK_ID 70 #define WSF_MSG_QUEUE_EVENT 0x01 71 #define WSF_TIMER_EVENT 0x02 72 #define WSF_HANDLER_EVENT 0x04 139 void WsfSetEvent(wsfHandlerId_t handlerId, wsfEventMask_t event);
void WsfOsRegisterSleepCheckFunc(WsfOsIdleCheckFunc_t func)
Register service check functions.
uint16_t param
General purpose parameter passed to event handler.
void WsfSetEvent(wsfHandlerId_t handlerId, wsfEventMask_t event)
Set an event for an event handler.
uint8_t wsfTaskEvent_t
Task event mask data type.
uint16_t wsfEventMask_t
Event handler event mask data type.
void WsfTaskUnlock(void)
Unlock task scheduling.
uint8_t(* WsfOsIdleCheckFunc_t)(void)
Idle check function.
wsfQueue_t * WsfTaskMsgQueue(wsfHandlerId_t handlerId)
Return the task message queue used by the given handler.
void(* wsfEventHandler_t)(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
Event handler callback function.
void WsfTaskSetReady(wsfHandlerId_t handlerId, wsfTaskEvent_t event)
Set the task used by the given handler as ready to run.
Platform-independent data types.
uint8_t wsfHandlerId_t
Event handler ID data type.
uint8_t event
General purpose event value passed to event handler.
void WsfOsInit(void)
Initialize OS control structure.
void wsfOsDispatcher(void)
Event dispatched. Designed to be called repeatedly from infinite loop.
void WsfTaskLock(void)
Lock task scheduling.
uint8_t status
General purpose status value passed to event handler.
uint8_t wsfOsReadyToSleep(void)
Check if WSF is ready to sleep.
wsfHandlerId_t WsfOsSetNextHandler(wsfEventHandler_t handler)
Set the next WSF handler function in the WSF OS handler array. This function should only be called as...
General purpose queue service.
wsfHandlerId_t wsfTaskId_t
Task ID data type.
wsfHandlerId_t WsfActiveHandler
Diagnostic Task Identifier.
Common message structure passed to event handler.
void WsfOsEnterMainLoop(void)
OS starts main loop.