Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

Disclaimer: UNLESS OTHERWISE EXPRESSLY AGREED WITH INFINEON, THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ALL WARRANTIES OF NON-INFRINGEMENT OF THIRD-PARTY RIGHTS AND IMPLIED WARRANTIES SUCH AS WARRANTIES OF FITNESS FOR A SPECIFIC USE/PURPOSE OR MERCHANTABILITY. Infineon reserves the right to make changes to the Software without notice. You are responsible for properly designing, programming, and testing the functionality and safety of your intended application of the Software, as well as complying with any legal requirements related to its use. Infineon does not guarantee that the Software will be free from intrusion, data theft or loss, or other breaches ("Security Breaches"), and Infineon shall have no liability arising out of any Security Breaches. Unless otherwise explicitly approved by Infineon, the Software may not be used in any application where a failure of the Product or any consequences of the use thereof can reasonably be expected to result in personal injury.

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.