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

This software, including source code, documentation and related materials ("Software") is owned by Cypress Semiconductor Corporation or one of its affiliates ("Cypress") and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Therefore, you may use this Software only as provided in the license agreement accompanying the software package from which you obtained this Software ("EULA"). If no EULA applies, Cypress hereby grants you a personal, non-exclusive, non-transferable license to copy, modify, and compile the Software source code solely for use in connection with Cypress's integrated circuit products. Any reproduction, modification, translation, compilation, or representation of this Software except as specified above is prohibited without the express written permission of Cypress.

Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes to the Software without notice. Cypress does not assume any liability arising out of the application or use of the Software or any product or circuit described in the Software. Cypress does not authorize its products for use in any products where a malfunction or failure of the Cypress product may reasonably be expected to result in significant property damage, injury or death ("High Risk Product"). By including Cypress's product in a High Risk Product, the manufacturer of such system or application assumes all risk of such use and in doing so agrees to indemnify Cypress against all liability.

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.