Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Events

Event management functions. More...

Functions

wiced_result_t wiced_rtos_register_timed_event (wiced_timed_event_t *event_object, wiced_worker_thread_t *worker_thread, event_handler_t function, uint32_t time_ms, void *arg)
 Requests a function be called at a regular interval. More...
 
wiced_result_t wiced_rtos_send_asynchronous_event (wiced_worker_thread_t *worker_thread, event_handler_t function, void *arg)
 Sends an asynchronous event to the associated worker thread. More...
 

Detailed Description

Event management functions.

Function Documentation

wiced_result_t wiced_rtos_register_timed_event ( wiced_timed_event_t *  event_object,
wiced_worker_thread_t *  worker_thread,
event_handler_t  function,
uint32_t  time_ms,
void *  arg 
)

Requests a function be called at a regular interval.

This function registers a function that will be called at a regular interval. Since this is based on the RTOS time-slice scheduling, the accuracy is not high, and is affected by processor load.

Parameters
event_object: pointer to a event handle which will be initialised
worker_thread: pointer to the worker thread in whose context the callback function runs on
function: the callback function that is to be called regularly
time_ms: the time period between function calls in milliseconds
arg: an argument that will be supplied to the function when it is called
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred
wiced_result_t wiced_rtos_send_asynchronous_event ( wiced_worker_thread_t *  worker_thread,
event_handler_t  function,
void *  arg 
)

Sends an asynchronous event to the associated worker thread.

Sends an asynchronous event to the associated worker thread

Parameters
worker_thread:the worker thread in which context the callback should execute from
function: the callback function to be called from the worker thread
arg: the argument to be passed to the callback function
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred