Software foundation OS API. More...
Go to the source code of this file.
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... | |
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... | |
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_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... | |
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... | |
Software foundation OS API.
Copyright (c) 2009-2019 Arm Ltd. All Rights Reserved.
Copyright (c) 2019-2020 Packetcraft, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file wsf_os.h.