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.
Synchronous API to initialize the WINC driver.
- 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.
This function initializes the WINC driver by registering the callback function for the M2M_WIFI layer
(also the callback function for bypass mode/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.
The possible Wi-Fi events that are expected to be received through the callback
function (provided by the application) to the M2M_WIFI layer are listed below:
- @ref M2M_WIFI_RESP_CON_STATE_CHANGED
- @ref M2M_WIFI_RESP_CONN_INFO
- @ref M2M_WIFI_REQ_DHCP_CONF
- @ref M2M_WIFI_REQ_WPS
- @ref M2M_WIFI_RESP_IP_CONFLICT
- @ref M2M_WIFI_RESP_SCAN_DONE
- @ref M2M_WIFI_RESP_SCAN_RESULT
- @ref M2M_WIFI_RESP_CURRENT_RSSI
- @ref M2M_WIFI_RESP_CLIENT_INFO
- @ref M2M_WIFI_RESP_PROVISION_INFO
- @ref M2M_WIFI_RESP_DEFAULT_CONNECT
- @ref M2M_WIFI_RESP_ETHERNET_RX_PACKET (if bypass mode is enabled)
- @ref M2M_WIFI_RESP_WIFI_RX_PACKET (if monitoring mode is enabled)
Any application using the WINC driver must call this function at the start of its main function.
- Parameters
-
[in] | pWifiInitParam | This is a pointer to a structure of type tstrWifiInitParam which contains pointers to the application WIFI layer callback function, monitoring mode callback and tstrEthInitParam structure (which contains initialization settings for bypass mode). |
- Returns
- The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
- Precondition
- Prior to this function call, The application should initialize the BSP using nm_bsp_init. Also, 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 indicates that the driver could not be initialized and a fatal error will prevent the application from proceeding, proper error handling should be implemented by the application.
- See Also
- m2m_wifi_deinit m2m_wifi_init_hold m2m_wifi_init_start tstrWifiInitParam tenuM2mStaCmd tenuM2mStaCmd
This function initializes the WINC driver by registering the callback function for the M2M_WIFI layer
(also the callback function for bypass mode/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.
The possible Wi-Fi events that are expected to be received through the callback
function (provided by the application) to the M2M_WIFI layer are listed below:
- @ref M2M_WIFI_RESP_CON_STATE_CHANGED
- @ref M2M_WIFI_RESP_CONN_INFO
- @ref M2M_WIFI_REQ_DHCP_CONF
- @ref M2M_WIFI_REQ_WPS
- @ref M2M_WIFI_RESP_IP_CONFLICT
- @ref M2M_WIFI_RESP_SCAN_DONE
- @ref M2M_WIFI_RESP_SCAN_RESULT
- @ref M2M_WIFI_RESP_CURRENT_RSSI
- @ref M2M_WIFI_RESP_CLIENT_INFO
- @ref M2M_WIFI_RESP_PROVISION_INFO
- @ref M2M_WIFI_RESP_DEFAULT_CONNECT
- @ref M2M_WIFI_RESP_ETHERNET_RX_PACKET (if bypass mode is enabled)
- @ref M2M_WIFI_RESP_WIFI_RX_PACKET (if monitoring mode is enabled)
Any application using the WINC driver must call this function at the start of its main function.
- Parameters
-
[in] | pWifiInitParam | This is a pointer to a variable of type tstrWifiInitParam which contains pointers to the application WIFI layer callback function, monitoring mode callback and tstrEthInitParam structure (which contains initialization settings for bypass mode). |
- Returns
- The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
- Precondition
- Prior to this function call, the application should initialize the BSP using nm_bsp_init. Also, the application must provide a callback function responsible for receiving all the wi-fi events that are received on the M2M_WIFI layer.
- Warning
- Failure to successfully complete indicates that the driver could not be initialized and a fatal error will prevent the application from proceeding, proper error handling should be implemented by the application.
- See Also
- m2m_wifi_deinit m2m_wifi_init_hold m2m_wifi_init_start m2m_wifi_reinit m2m_wifi_reinit_hold m2m_wifi_reinit_start m2m_wifi_download_mode tstrWifiInitParam tenuM2mStaCmd