Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Functions | Variables
WSF_OS_API

Data Structures

struct  wsfMsgHdr_t
 Common message structure passed to event handler. More...
 

Macros

#define WSF_OS_DIAG   FALSE
 OS Diagnostics. More...
 
#define WSF_TASK_FROM_ID(handlerID)    (((handlerID) >> 4) & 0x0F)
 Derive task from handler ID. More...
 
#define WSF_HANDLER_FROM_ID(handlerID)    ((handlerID) & 0x0F)
 Derive handler from handler ID. More...
 
#define WSF_INVALID_TASK_ID   0xFF
 Invalid Task Identifier. More...
 
#define WSF_OS_GET_ACTIVE_HANDLER_ID()    WSF_INVALID_TASK_ID
 Get Diagnostic Task Identifier. More...
 

Typedefs

typedef uint8_t wsfHandlerId_t
 Event handler ID data type. More...
 
typedef uint16_t wsfEventMask_t
 Event handler event mask data type. More...
 
typedef wsfHandlerId_t wsfTaskId_t
 Task ID data type. More...
 
typedef uint8_t wsfTaskEvent_t
 Task event mask data type. More...
 
typedef uint8_t(* WsfOsIdleCheckFunc_t) (void)
 Idle check function. More...
 
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_tWsfTaskMsgQueue (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...
 
uint8_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 WsfOsInit (void)
 Initialize OS control structure. More...
 
void WsfOsEnterMainLoop (void)
 OS starts main loop. More...
 
void WsfOsRegisterSleepCheckFunc (WsfOsIdleCheckFunc_t func)
 Register service check functions. More...
 

Variables

wsfHandlerId_t WsfActiveHandler
 Diagnostic Task Identifier. More...
 

WSF Task Events

#define WSF_MSG_QUEUE_EVENT   0x01
 Message queued for event handler. More...
 
#define WSF_TIMER_EVENT   0x02
 Timer expired for event handler. More...
 
#define WSF_HANDLER_EVENT   0x04
 Event set for event handler. More...
 

Detailed Description

Macro Definition Documentation

#define WSF_HANDLER_EVENT   0x04

Event set for event handler.

Definition at line 72 of file wsf_os.h.

#define WSF_HANDLER_FROM_ID (   handlerID)    ((handlerID) & 0x0F)

Derive handler from handler ID.

Definition at line 54 of file wsf_os.h.

#define WSF_INVALID_TASK_ID   0xFF

Invalid Task Identifier.

Definition at line 57 of file wsf_os.h.

#define WSF_MSG_QUEUE_EVENT   0x01

Message queued for event handler.

Definition at line 70 of file wsf_os.h.

#define WSF_OS_DIAG   FALSE

OS Diagnostics.

Definition at line 43 of file wsf_os.h.

#define WSF_OS_GET_ACTIVE_HANDLER_ID ( )    WSF_INVALID_TASK_ID

Get Diagnostic Task Identifier.

Definition at line 63 of file wsf_os.h.

#define WSF_TASK_FROM_ID (   handlerID)    (((handlerID) >> 4) & 0x0F)

Derive task from handler ID.

Definition at line 51 of file wsf_os.h.

#define WSF_TIMER_EVENT   0x02

Timer expired for event handler.

Definition at line 71 of file wsf_os.h.

Typedef Documentation

typedef void(* wsfEventHandler_t) (wsfEventMask_t event, wsfMsgHdr_t *pMsg)

Event handler callback function.

Parameters
eventMask of events set for the event handler.
pMsgPointer to message for the event handler.

Definition at line 125 of file wsf_os.h.

typedef uint16_t wsfEventMask_t

Event handler event mask data type.

Definition at line 83 of file wsf_os.h.

typedef uint8_t wsfHandlerId_t

Event handler ID data type.

Definition at line 80 of file wsf_os.h.

typedef uint8_t(* WsfOsIdleCheckFunc_t) (void)

Idle check function.

Definition at line 92 of file wsf_os.h.

typedef uint8_t wsfTaskEvent_t

Task event mask data type.

Definition at line 89 of file wsf_os.h.

Task ID data type.

Definition at line 86 of file wsf_os.h.

Function Documentation

void wsfOsDispatcher ( void  )

Event dispatched. Designed to be called repeatedly from infinite loop.

void WsfOsEnterMainLoop ( void  )

OS starts main loop.

void WsfOsInit ( void  )

Initialize OS control structure.

Returns
None.
uint8_t wsfOsReadyToSleep ( void  )

Check if WSF is ready to sleep.

Returns
Return TRUE if there are no pending WSF task events set, FALSE otherwise.
void WsfOsRegisterSleepCheckFunc ( WsfOsIdleCheckFunc_t  func)

Register service check functions.

Parameters
funcService function.
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.

Parameters
handlerWSF handler function.
Returns
WSF handler ID for this handler.
void WsfSetEvent ( wsfHandlerId_t  handlerId,
wsfEventMask_t  event 
)

Set an event for an event handler.

Parameters
handlerIdHandler ID.
eventEvent or events to set.
void WsfTaskLock ( void  )

Lock task scheduling.

wsfQueue_t* WsfTaskMsgQueue ( wsfHandlerId_t  handlerId)

Return the task message queue used by the given handler.

Parameters
handlerIdEvent handler ID.
Returns
Task message queue.
void WsfTaskSetReady ( wsfHandlerId_t  handlerId,
wsfTaskEvent_t  event 
)

Set the task used by the given handler as ready to run.

Parameters
handlerIdEvent handler ID.
eventTask event mask.
void WsfTaskUnlock ( void  )

Unlock task scheduling.

Variable Documentation

wsfHandlerId_t WsfActiveHandler

Diagnostic Task Identifier.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.