![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
struct | wsfMsgHdr_t |
Common message structure passed to event handler. More... | |
Macros | |
#define | WSF_OS_DIAG FALSE |
OS Diagnostics. | |
#define | WSF_TASK_FROM_ID(handlerID) (((handlerID) >> 4) & 0x0F) |
Derive task from handler ID. | |
#define | WSF_HANDLER_FROM_ID(handlerID) ((handlerID) & 0x0F) |
Derive handler from handler ID. | |
#define | WSF_INVALID_TASK_ID 0xFF |
Invalid Task Identifier. | |
#define | WSF_OS_GET_ACTIVE_HANDLER_ID() WsfActiveHandler |
Get Diagnostic Task Identifier. | |
Typedefs | |
typedef uint8_t | wsfHandlerId_t |
Event handler ID data type. | |
typedef uint8_t | wsfEventMask_t |
Event handler event mask data type. | |
typedef wsfHandlerId_t | wsfTaskId_t |
Task ID data type. | |
typedef uint8_t | wsfTaskEvent_t |
Task event mask data type. | |
typedef void(* | wsfEventHandler_t) (wsfEventMask_t event, wsfMsgHdr_t *pMsg) |
Event handler callback function. More... | |
Functions | |
void | WsfSetEvent (wsfHandlerId_t handlerId, wsfEventMask_t event) |
Set an event for an event handler. More... | |
void | WsfTaskLock (void) |
Lock task scheduling. More... | |
void | WsfTaskUnlock (void) |
Unlock task scheduling. More... | |
void | WsfTaskSetReady (wsfHandlerId_t handlerId, wsfTaskEvent_t event) |
Set the task used by the given handler as ready to run. More... | |
wsfQueue_t * | WsfTaskMsgQueue (wsfHandlerId_t handlerId) |
Return the task message queue used by the given handler. More... | |
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 part of the OS initialization procedure. More... | |
bool_t | wsfOsReadyToSleep (void) |
Check if WSF is ready to sleep. More... | |
void | wsfOsDispatcher (void) |
Event dispatched. Designed to be called repeatedly from infinite loop. More... | |
void | WsfOsShutdown (void) |
Shutdown OS. More... | |
Variables | |
wsfHandlerId_t | WsfActiveHandler |
Diagnostic Task Identifier. | |
WSF Task Events | |
#define | WSF_MSG_QUEUE_EVENT 0x01 |
Message queued for event handler. | |
#define | WSF_TIMER_EVENT 0x02 |
Timer expired for event handler. | |
#define | WSF_HANDLER_EVENT 0x04 |
Event set for event handler. | |
typedef void(* wsfEventHandler_t) (wsfEventMask_t event, wsfMsgHdr_t *pMsg) |
void WsfSetEvent | ( | wsfHandlerId_t | handlerId, |
wsfEventMask_t | event | ||
) |
Set an event for an event handler.
handlerId | Handler ID. |
event | Event or events to set. |
void WsfTaskLock | ( | void | ) |
Lock task scheduling.
void WsfTaskUnlock | ( | void | ) |
Unlock task scheduling.
void WsfTaskSetReady | ( | wsfHandlerId_t | handlerId, |
wsfTaskEvent_t | event | ||
) |
Set the task used by the given handler as ready to run.
handlerId | Event handler ID. |
event | Task event mask. |
wsfQueue_t* WsfTaskMsgQueue | ( | wsfHandlerId_t | handlerId | ) |
Return the task message queue used by the given handler.
handlerId | Event handler ID. |
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 part of the OS initialization procedure.
handler | WSF handler function. |
bool_t wsfOsReadyToSleep | ( | void | ) |
Check if WSF is ready to sleep.
void wsfOsDispatcher | ( | void | ) |
Event dispatched. Designed to be called repeatedly from infinite loop.
void WsfOsShutdown | ( | void | ) |
Shutdown OS.