Functions | |
| wwd_result_t | host_rtos_create_configed_thread (host_thread_type_t *thread, void(*entry_function)(uint32_t), const char *name, void *stack, uint32_t stack_size, uint32_t priority, host_rtos_thread_config_type_t *config) |
| wwd_result_t | host_rtos_create_thread (host_thread_type_t *thread, void(*entry_function)(wwd_thread_arg_t arg), const char *name, void *stack, uint32_t stack_size, uint32_t priority) |
| wwd_result_t | host_rtos_create_thread_with_arg (host_thread_type_t *thread, void(*entry_function)(wwd_thread_arg_t arg), const char *name, void *stack, uint32_t stack_size, uint32_t priority, wwd_thread_arg_t arg) |
| wwd_result_t | host_rtos_deinit_semaphore (host_semaphore_type_t *semaphore) |
| wwd_result_t | host_rtos_delay_milliseconds (uint32_t num_ms) |
| wwd_result_t | host_rtos_delete_terminated_thread (host_thread_type_t *thread) |
| wwd_result_t | host_rtos_finish_thread (host_thread_type_t *thread) |
| wwd_result_t | host_rtos_get_semaphore (host_semaphore_type_t *semaphore, uint32_t timeout_ms, wiced_bool_t will_set_in_isr) |
| wwd_time_t | host_rtos_get_time (void) |
| wwd_result_t | host_rtos_init_semaphore (host_semaphore_type_t *semaphore) |
| wwd_result_t | host_rtos_join_thread (host_thread_type_t *thread) |
| wwd_result_t | host_rtos_register_timer_ifc (const host_rtos_timer_ifc_t *host_rtos_timer_ifc) |
| wwd_result_t | host_rtos_set_semaphore (host_semaphore_type_t *semaphore, wiced_bool_t called_from_ISR) |
| wwd_result_t | host_rtos_unregister_timer_ifc (const host_rtos_timer_ifc_t *host_rtos_timer_ifc) |
Allows WICED to use use RTOS resources such as threads, semaphores & timing functions in an abstract way.
Allows WICED to use use RTOS resources such as threads, semaphores & timing functions in an abstract way.
|
extern |
Note: different RTOS have different parameters for creating threads. Use this function carefully if portability is important. Create a thread with RTOS specific thread argument (E.g. specify time-slicing behavior)
Implemented in the WICED RTOS interface which is specific to the RTOS in use.
| thread | : pointer to a variable which will receive the new thread handle |
| entry_function | : function pointer which points to the main function for the new thread |
| name | : a string thread name used for a debugger |
| stack_size | : the size of the thread stack in bytes |
| priority | : the priority of the thread |
| arg | : the argument to pass to the new thread |
| config | : os specific thread configuration |
Creates a new thread
| thread | : pointer to variable which will receive handle of created thread |
| entry_function | : main thread function |
| name | : a string thread name used for a debugger |
| config | : os specific thread creation params |
Note: different RTOS have different parameters for creating threads. Use this function carefully if portability is important. Create a thread with RTOS specific thread argument (E.g. specify time-slicing behavior)
Implemented in the WICED RTOS interface which is specific to the RTOS in use.
| thread | : pointer to a variable which will receive the new thread handle |
| entry_function | : function pointer which points to the main function for the new thread |
| name | : a string thread name used for a debugger |
| stack_size | : the size of the thread stack in bytes |
| priority | : the priority of the thread |
| arg | : the argument to pass to the new thread |
| config | : os specific thread configuration |
|
extern |
Create a thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to create a new thread and start it running.
| thread | : pointer to a variable which will receive the new thread handle |
| entry_function | : function pointer which points to the main function for the new thread |
| name | : a string thread name used for a debugger |
| stack_size | : the size of the thread stack in bytes |
| priority | : the priority of the thread |
Creates a new thread
| thread | : pointer to variable which will receive handle of created thread |
| entry_function | : main thread function |
| name | : a string thread name used for a debugger |
Create a thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to create a new thread and start it running.
| thread | : pointer to a variable which will receive the new thread handle |
| entry_function | : function pointer which points to the main function for the new thread |
| name | : a string thread name used for a debugger |
| stack_size | : the size of the thread stack in bytes |
| priority | : the priority of the thread |
|
extern |
Create a thread with specific thread argument
Implemented in the WICED RTOS interface which is specific to the RTOS in use.
| thread | : pointer to a variable which will receive the new thread handle |
| entry_function | : function pointer which points to the main function for the new thread |
| name | : a string thread name used for a debugger |
| stack_size | : the size of the thread stack in bytes |
| priority | : the priority of the thread |
| arg | : the argument to pass to the new thread |
|
extern |
Deletes a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to delete a semaphore.
| semaphore | : Pointer to the semaphore handle |
Deletes a semaphore
WICED uses this function to delete a semaphore.
| semaphore | : Pointer to the semaphore handle |
Deletes a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to delete a semaphore.
| semaphore | : Pointer to the semaphore handle |
|
extern |
Delay for a number of milliseconds
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to delay processing Processing of this function depends on the minimum sleep time resolution of the RTOS. The current thread should sleep for the longest period possible which is less than the delay required, then makes up the difference with a tight loop
Delay for a number of milliseconds
Processing of this function depends on the minimum sleep time resolution of the RTOS. The current thread sleeps for the longest period possible which is less than the delay required, then makes up the difference with a tight loop
Delay for a number of milliseconds
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to delay processing Processing of this function depends on the minimum sleep time resolution of the RTOS. The current thread should sleep for the longest period possible which is less than the delay required, then makes up the difference with a tight loop
|
extern |
Deletes a terminated thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. Some RTOS implementations require that another thread deletes any terminated thread If RTOS does not require this, leave empty
| thread | : handle of the terminated thread to delete |
Deletes a terminated thread
ThreadX requires that another thread deletes any terminated threads
| thread | : handle of the terminated thread to delete |
Deletes a terminated thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. Some RTOS implementations require that another thread deletes any terminated thread If RTOS does not require this, leave empty
| thread | : handle of the terminated thread to delete |
|
extern |
Exit a thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to exit the current thread just before its main function would otherwise return. Some RTOSs allow threads to exit by simply returning from their main function. If this is the case, then the implementation of this function should be empty.
| thread | : Pointer to the current thread handle |
Terminates the current thread
This does nothing since ThreadX threads can exit by just returning
| thread | : handle of the thread to terminate |
Exit a thread
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to exit the current thread just before its main function would otherwise return. Some RTOSs allow threads to exit by simply returning from their main function. If this is the case, then the implementation of this function should be empty.
| thread | : Pointer to the current thread handle |
|
extern |
Get a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to get a semaphore.
| semaphore | : Pointer to the semaphore handle |
| timeout_ms | : Maximum number of milliseconds to wait while attempting to get the semaphore. Use the NEVER_TIMEOUT constant to wait forever. |
| will_set_in_isr | : True if the semaphore will be set in an ISR. Currently only used for NoOS/NoNS |
Gets a semaphore
If value of semaphore is larger than zero, then the semaphore is decremented and function returns Else If value of semaphore is zero, then current thread is suspended until semaphore is set. Value of semaphore should never be below zero
Must not be called from interrupt context, since it could block, and since an interrupt is not a normal thread, so could cause RTOS problems if it tries to suspend it.
| semaphore | : Pointer to variable which will receive handle of created semaphore |
| timeout_ms | : Maximum period to block for. Can be passed NEVER_TIMEOUT to request no timeout |
| will_set_in_isr | : True if the semaphore will be set in an ISR. Currently only used for NoOS/NoNS |
Get a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to get a semaphore.
| semaphore | : Pointer to the semaphore handle |
| timeout_ms | : Maximum number of milliseconds to wait while attempting to get the semaphore. Use the NEVER_TIMEOUT constant to wait forever. |
| will_set_in_isr | : True if the semaphore will be set in an ISR. Currently only used for NoOS/NoNS |
|
extern |
Gets time in milliseconds since RTOS start
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to retrieve the current time.
Gets time in milliseconds since RTOS start
@Note: since this is only 32 bits, it will roll over every 49 days, 17 hours.
Gets time in milliseconds since RTOS start
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to retrieve the current time.
|
extern |
Create a Semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to create a semaphore
| semaphore | : Pointer to the semaphore handle to be initialized |
Creates a semaphore
| semaphore | : pointer to variable which will receive handle of created semaphore |
Create a Semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to create a semaphore
| semaphore | : Pointer to the semaphore handle to be initialized |
|
extern |
Waits for a thread to complete
Implemented in the WICED RTOS interface which is specific to the RTOS in use.
| thread | : handle of the thread to wait for |
Blocks the current thread until the indicated thread is complete
| thread | : handle of the thread to terminate |
Waits for a thread to complete
Implemented in the WICED RTOS interface which is specific to the RTOS in use.
| thread | : handle of the thread to wait for |
|
extern |
Register a timer interface for WWD to use.
|
extern |
Set a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to set a semaphore. The value of the semaphore is incremented, and if there are any threads waiting on the semaphore, then the first waiting thread is woken.
Some RTOS implementations require different processing when setting a semaphore from within an ISR. A parameter is provided to allow this.
| semaphore | : Pointer to the semaphore handle |
| called_from_ISR | : Value of WICED_TRUE indicates calling from interrupt context Value of WICED_FALSE indicates calling from normal thread context |
Sets a semaphore
If any threads are waiting on the semaphore, the first thread is resumed Else increment semaphore.
Can be called from interrupt context, so must be able to handle resuming other threads from interrupt context.
| semaphore | : Pointer to variable which will receive handle of created semaphore |
| called_from_ISR | : Value of WICED_TRUE indicates calling from interrupt context Value of WICED_FALSE indicates calling from normal thread context |
Set a semaphore
Implemented in the WICED RTOS interface which is specific to the RTOS in use. WICED uses this function to set a semaphore. The value of the semaphore is incremented, and if there are any threads waiting on the semaphore, then the first waiting thread is woken.
Some RTOS implementations require different processing when setting a semaphore from within an ISR. A parameter is provided to allow this.
| semaphore | : Pointer to the semaphore handle |
| called_from_ISR | : Value of WICED_TRUE indicates calling from interrupt context Value of WICED_FALSE indicates calling from normal thread context |
|
extern |
Unregister a timer interface WWD was using.