WINC1500 IoT Software APIs: m2m_wifi_init

WINC1500 IoT Software API

WINC1500 IoT Software APIs  19.5.2
WINC Software API Reference Manual
m2m_wifi_init

Functions

NMI_API sint8 m2m_wifi_init (tstrWifiInitParam *pWifiInitParam)
 

Detailed Description

Synchronous initialization function for the WINC driver. This function initializes the driver by, registering the call back function for M2M_WIFI layer(also the call back 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.

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 :

    @ref M2M_WIFI_RESP_CON_STATE_CHANGED \n
    @ref M2M_WIFI_RESP_CONN_INFO \n
    @ref M2M_WIFI_REQ_DHCP_CONF \n
    @ref M2M_WIFI_REQ_WPS \n
    @ref M2M_WIFI_RESP_IP_CONFLICT \n 
    @ref M2M_WIFI_RESP_SCAN_DONE \n
    @ref M2M_WIFI_RESP_SCAN_RESULT \n
    @ref M2M_WIFI_RESP_CURRENT_RSSI \n
    @ref M2M_WIFI_RESP_CLIENT_INFO \n
    @ref M2M_WIFI_RESP_PROVISION_INFO  \n
    @ref M2M_WIFI_RESP_DEFAULT_CONNECT \n
Example: \n
In case Bypass mode is defined : \n
    @ref M2M_WIFI_RESP_ETHERNET_RX_PACKET

In case Monitoring mode is used: \n
    @ref M2M_WIFI_RESP_WIFI_RX_PACKET

Any application using the WINC driver must call this function at the start of its main function.

Function Documentation

◆ m2m_wifi_init()

NMI_API sint8 m2m_wifi_init ( tstrWifiInitParam pWifiInitParam)

Initialize the WINC host driver. This function initializes the driver by, registering the call back function for M2M_WIFI layer(also the call back function for bypass mode/monitoring mode if defined), initializing the host interface layer and the bus interfaces.

Parameters
[in]pWifiInitParamThis 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 structure containing bypass mode parameters.
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 function indicates that the driver couldn't be initialized and a fatal error will prevent the application from proceeding.
See also
nm_bsp_init m2m_wifi_deinit tenuM2mStaCmd
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
Generated on Thu Jan 26 2017 22:15:21 for WINC1500 IoT Software APIs by   doxygen 1.8.13