SWRA704 June 2021 CC3120 , CC3130 , CC3135
The asynchronous event handlers are used to pass aynchronous events from the network processor to the host application. This includes fatal errors, notifications of WLAN connections and disconnections, socket events, and more. The async event handlers are defined in user.h, but they are implemented by the developer in the application.
The event handlers are meant to be customized for the application. There are many references for how these event handlers can be used in the Wi-Fi SDK and Plugin examples. For more details, review the UserEvents in the Host Driver API documentation in the Wi-Fi SDK or Plugin. The following code snippet defines the event handlers with the API names that are commonly used in the examples.
user.h:
#define slcb_DeviceFatalErrorEvtHdlr SimpleLinkFatalErrorEventHandler
#define slcb_DeviceGeneralEvtHdlr SimpleLinkGeneralEventHandler
#define slcb_WlanEvtHdlr SimpleLinkWlanEventHandler
#define slcb_NetAppEvtHdlr SimpleLinkNetAppEventHandler
#define slcb_NetAppRequestHdlr SimpleLinkNetAppRequestEventHandler
#define slcb_NetAppRequestMemFree SimpleLinkNetAppRequestMemFreeEventHandler
#define slcb_SockEvtHdlr SimpleLinkSockEventHandler