Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Callbacks

    Provides detail on the available callbacks for the Wlan APIs.

Typedefs

typedef void(* tpfAppEthCb )(uint8 u8MsgType, void *pvMsg, void *pvCtrlBuf)
 Ethernet (Bypass mode) notification callback function receiving Bypass mode events as defined in the Wi-Fi responses enumeration tenuM2mStaCmd. More...
 
typedef void(* tpfAppWifiCb )(uint8 u8MsgType, void *pvMsg)
 This is the main callback function for the Wi-Fi driver and is responsible for processing any M2M_WIFI events that are received on the Wi-Fi interface. These events (notifications) are usually received in response to earlier Wi-Fi requests such as m2m_wifi_request_scan, m2m_wifi_connect_open, m2m_wifi_get_connection_info m2m_wifi_req_curr_rssi, m2m_wifi_get_system_time, etc. More...
 

void(* tpfAppEthCb)(uint8 u8MsgType, void *pvMsg, void *pvCtrlBuf)

Ethernet (Bypass mode) notification callback function receiving Bypass mode events as defined in the Wi-Fi responses enumeration tenuM2mStaCmd.

If bypass mode is enabled, applications must ensure this callback function is registered
with the Wi-Fi driver by calling @ref m2m_wifi_init.
Parameters
[in]u8MsgTypeType of notification. Possible types are:
[in]pvMsgA pointer to a buffer containing the notification parameters (if any). It should be cast to the correct data type corresponding to the notification type.

For example, it could be a pointer to the buffer holding the received frame in case a M2M_WIFI_RESP_ETHERNET_RX_PACKET event is received.

Parameters
[in]pvControlBufA pointer to control buffer describing the accompanied message. This must be cast to the data type tstrM2mIpCtrlBuf in case of M2M_WIFI_RESP_ETHERNET_RX_PACKET event.
Warning
Make sure that the application defines ETH_MODE.
See Also
m2m_wifi_init
void(* tpfAppWifiCb)(uint8 u8MsgType, void *pvMsg)

This is the main callback function for the Wi-Fi driver and is responsible for processing any M2M_WIFI events that are received on the Wi-Fi interface. These events (notifications) are usually received in response to earlier Wi-Fi requests such as m2m_wifi_request_scan, m2m_wifi_connect_open, m2m_wifi_get_connection_info m2m_wifi_req_curr_rssi, m2m_wifi_get_system_time, etc.

Most Wi-Fi APIs are implemented in an asynchronous mode and calling them generates information
that is then passed back to the application via this callback. For instance, a set of detected
networks to be passed back as a result to a call to @ref m2m_wifi_request_scan.

Applications must ensure a callback function is registered with the Wi-Fi driver by
calling @ref m2m_wifi_init.
Parameters
[in]u8MsgTypeType of notification. Possible types are:
[in]pvMsgA pointer to a buffer containing the notification parameters (if any). It should be cast to the correct data type corresponding to the notification type.
See Also
tstrM2mWifiStateChanged tstrM2MWPSInfo tstrM2mScanDone tstrM2mWifiscanResult m2m_wifi_init