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] | fn | function to execute once dequeued from app thread |
[in] | data | pointer 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.