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

Data Structures

struct  wiced_app_event_srzn_cb_t
 Structure used in AIROC stack to add callback and data into task queue. More...
 

Functions

wiced_bool_t wiced_app_event_serialize (int(*fn)(void *), void *data)
 This function lets you serialize a call onto the application thread, which has been instantiated by the AIROC stack and is used to interact with the application in an event-based fashion. More...
 

Detailed Description

Function Documentation

wiced_bool_t wiced_app_event_serialize ( int(*)(void *)  fn,
void *  data 
)

This function lets you serialize a call onto the application thread, which has been instantiated by the AIROC stack and is used to interact with the application in an event-based fashion.

Once serialized, tasks are pushed onto a task queue, where they are pulled based on pre-defined priority of the application thread. The queue is 16 deep, but this is shared with the stack.

Parameters
[in]fnfunction to execute once dequeued from app thread
[in]datapointer to non-local data to be sent as arg to callback
Returns
  • WICED_TRUE indicates success
  • WICED_FALSE indicates failure
Note
The data parameter must point to non-local data as the pointer will be accessed after the current function returns.
Data will not be freed by stack. If allocated by app, must be freed by app.