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.
Functions | |
NMI_API sint8 | m2m_wifi_init (tstrWifiInitParam *pWifiInitParam) |
NMI_API sint8 m2m_wifi_init | ( | tstrWifiInitParam * | param | ) |
[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. |
References tstrEthInitParam::au8ethRcvBuf, gpfAppEthCb, gpfAppMonCb, gpfAppWifiCb, gpu8ethRcvBuf, gu16ethRcvBufSize, gu8scanInProgress, hif_init(), hif_register_cb(), M2M_REQ_GRP_WIFI, M2M_SUCCESS, m2m_wifi_cb(), nm_drv_deinit(), nm_drv_init(), NULL, tstrEthInitParam::pfAppEthCb, tstrWifiInitParam::pfAppMonCb, tstrWifiInitParam::pfAppWifiCb, tstrHifinitParam::pu8RcvBuff, tstrWifiInitParam::strEthInitParam, strHifInitParam, tstrEthInitParam::u16ethRcvBufSize, and tstrHifinitParam::u32RcvBuffSize.
Referenced by os_m2m_wifi_init_imp().