Synchronous initialization functions for the WILC driver. This function initializes the driver by, registering the call back function for M2M_WIFI layer (also the call back function for monitoring mode if defined),
initializing the host interface layer and the bus interfaces.
Wi-Fi callback registering is essential to allow the handling of the events received, in response to the asynchronous wi-fi operations.
Following are the possible wi-fi events that are expected to be received through the call back function(provided by the application) to the M2M_WIFI layer are :
M2M_WIFI_RESP_CON_STATE_CHANGED
M2M_WIFI_RESP_CONN_INFO
M2M_WIFI_RES_WPS
M2M_WIFI_RESP_SCAN_DONE
M2M_WIFI_RESP_SCAN_RESULT
M2M_WIFI_RESP_CURRENT_RSSI
M2M_WIFI_RESP_DEFAULT_CONNECT
M2M_WIFI_RESP_ETHERNET_RX_PACKET Example:
In case Monitoring mode is used:
M2M_WIFI_RESP_WIFI_RX_PACKET
Any application using the WILC driver must call this function at the start of its main function.
◆ m2m_wifi_init()
- Parameters
-
[in] | pWifiInitParam | This is a pointer to the tstrWifiInitParam structure which holds the pointer to the application WIFI layer call back function, monitoring mode call back and tstrEthInitParam strucutre. |
- Precondition
- Prior to this function call, application users must provide a call back function responsible for receiving all the wi-fi events that are received on the M2M_WIFI layer.
- Warning
- Failure to successfully complete function indicates that the driver couldn't be initialized and a fatal error will prevent the application from proceeding.
- See also
- m2m_wifi_deinit tenuM2mStaCmd
- Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.