A helper API for Task creation for the user domain and also a wrapper module for the task creation functions of FreeRTOS.
This module is used to control and limit the use of task creation by the user so to accommodate easy backward compatibility in the future.
This module is limited to when the RTOS Scheduler is not running
2020 Silicon Laboratories Inc.
Modules#
Enumerations#
Return code used by the functions in this module.
Functions#
Initializes this module.
Used to create user application level tasks.
Used to create the main application task at highest UserTask priority.
Enumeration Documentation#
ZW_UserTask_Priority_t#
ZW_UserTask_Priority_t
Enumerator | |
---|---|
USERTASK_PRIORITY_BACKGROUND | Right above idle priority. Good for HMI and worker threads. |
USERTASK_PRIORITY_NORMAL | The default 'APP'-task priority. |
USERTASK_PRIORITY_HIGHEST | High priority UserTask. Good for handling interrupts requests. |
42
of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZWave/API/ZW_UserTask.h
ReturnCode_t#
ReturnCode_t
Return code used by the functions in this module.
Enumerator | |
---|---|
Code_Success | Success. |
Code_Fail_Unknown | Default failed code with no helping indication. |
Code_Fail_NoMemory | Failed due to lack of memory. |
Code_Fail_LimitReached | A set limit is reached for this operation. |
Code_Fail_NotFound | A specific entity could not be found. |
Code_Fail_Suspended | The operation or the entire module is globally suspended and cannot be utilized at this point in time. |
Code_Fail_InvalidState | Not in an appropriate state for this call. |
Code_Fail_InvalidOperation | This operation can not be allowed at this point. |
Code_Fail_InvalidParameter | Wrong/invalid input parameters. |
Code_DependencyUnavailable | A required resource or dependency that this operation relies on was not setup or available. Perhaps wrong initialization order. |
Code_Fail_Busy | A resource needed by this operation or call is busy. Try again later. Potential racing condition or untimely action. |
Code_Fail_Timeout | Failed due to timeout. |
Code_Fail_Driver | Error occurred at the driver level. |
Code_Fail_NotImplemented | This operation is not supported due to limited implementation or need. |
Code_Fail_NotAllowed | This operation cannot be performed, since it is blocked or not allowed. |
60
of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZWave/API/ZW_UserTask.h
Function Documentation#
ZW_UserTask_Init#
ReturnCode_t ZW_UserTask_Init (void )
Initializes this module.
N/A |
Should not be used directly.
Return Returns ReturnCode_t. See Also
See ReturnCode_t for more info.
84
of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZWave/API/ZW_UserTask.h
ZW_UserTask_CreateTask#
ReturnCode_t ZW_UserTask_CreateTask (ZW_UserTask_t * task, TaskHandle_t * xHandle)
Used to create user application level tasks.
[out] | task | Used to return the task handle. Can be NULL Return Returns ReturnCode_t. See ReturnCode_t for more info. |
N/A | xHandle |
See Also
See ZW_UserTask_t for more info.
93
of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZWave/API/ZW_UserTask.h
ZW_UserTask_ApplicationRegisterTask#
bool ZW_UserTask_ApplicationRegisterTask (void(*)(SApplicationHandles *) appTaskFunc, uint8_t iZwRxQueueTaskNotificationBitNumber, uint8_t iZwCommandStatusQueueTaskNotificationBitNumber, const SProtocolConfig_t * pProtocolConfig)
Used to create the main application task at highest UserTask priority.
N/A | appTaskFunc | Application task that will be triggered by FreeRTOS. (function pointer) |
N/A | iZwRxQueueTaskNotificationBitNumber | The bit number set by Protocol when a message has been put on the ZW Rx queue. (Receiving EAPPLICATIONEVENT_ZWRX events) |
N/A | iZwCommandStatusQueueTaskNotificationBitNumber | The bit number Set by Protocol when a message has been put on the ZW command status queue. (Receiving EAPPLICATIONEVENT_ZWCOMMANDSTATUS events) |
N/A | pProtocolConfig | Pointer to a statically allocated Protocol Config structure. |
This function further registers Queue Notification Bit Numbers so that an association is created between the bit number and the event handle to invoke for that event, when it occurs.
This function should only be called once, or false is returned
This task is the only UserTask that should use the ZAF API functions. Accessing the ZAF API functions from any other ZW_UserTask.h generated tasks will lead to undefined behavior
See Also
Returns
true if the main APP task was created successfully, false if not.
115
of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZWave/API/ZW_UserTask.h