Here are listed all the functions that implement the Wlan Initialization APIs.
Functions | |
sint8 | m2m_wifi_deinit (void *arg) |
Synchronous API to de-initialize the WINC driver and host interface. More... | |
sint8 | m2m_wifi_download_mode () |
Prepares the WINC before downloading any data (Firmware, Certificates, etc). More... | |
uint8 | m2m_wifi_get_state (void) |
Get the wifi state. More... | |
sint8 | m2m_wifi_init (tstrWifiInitParam *param) |
Synchronous API to initialize the WINC driver. More... | |
sint8 | m2m_wifi_init_hold (void) |
First part of m2m_wifi_init, up to the point of initializing SPI for flash access. More... | |
sint8 | m2m_wifi_init_start (tstrWifiInitParam *param) |
Second part of m2m_wifi_init, continuing from where m2m_wifi_init_hold left off. More... | |
sint8 | m2m_wifi_reinit (tstrWifiInitParam *param) |
De-initialize and then initialize wifi. Resets the WINC. More... | |
sint8 | m2m_wifi_reinit_hold (void) |
First part of m2m_wifi_reinit, up to the point of initializing SPI for flash access. More... | |
sint8 | m2m_wifi_reinit_start (tstrWifiInitParam *param) |
Second part of m2m_wifi_reinit, continuing from where m2m_wifi_reinit_hold left off. More... | |
Synchronous API to de-initialize the WINC driver and host interface.
De-initialization function for the WINC driver. De-initializes the host interface and frees any resources used by the M2M_WIFI layer. This function must be called in the application closing phase to ensure that all resources have been correctly released.
[in] | arg | Opaque argument, not used in current implementation. Application should use null. |
References hif_deinit(), M2M_SUCCESS, nm_drv_deinit(), and NULL.
Referenced by m2m_wifi_reinit_hold().
NMI_API void m2m_wifi_download_mode | ( | void | ) |
Prepares the WINC before downloading any data (Firmware, Certificates, etc).
This function should be called before attempting to download any data to the WINC. Performs the appropriate WINC driver initialization, this includes bus initialization, interrupt enabling and it halts the chip to allow for the firmware downloads. Firmware can be downloaded through a number of interfaces, UART, I2C and SPI.
References enable_interrupts(), M2M_SUCCESS, and nm_drv_init_download_mode().
Get the wifi state.
References nm_get_state(), NM_STATE_DEINIT, NM_STATE_INIT, NM_STATE_START, WIFI_STATE_DEINIT, WIFI_STATE_INIT, and WIFI_STATE_START.
Referenced by m2m_wifi_handle_events().
NMI_API sint8 m2m_wifi_init | ( | tstrWifiInitParam * | pWifiInitParam | ) |
Synchronous API to initialize the WINC driver.
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.
[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). |
References M2M_SUCCESS, m2m_wifi_init_hold(), and m2m_wifi_init_start().
Referenced by m2m_ble_wifi_init().
First part of m2m_wifi_init, up to the point of initializing SPI for flash access.
References M2M_ERR_FAIL, and nm_drv_init_hold().
Referenced by m2m_wifi_init(), and m2m_wifi_reinit_hold().
NMI_API sint8 m2m_wifi_init_start | ( | tstrWifiInitParam * | pWifiInitParam | ) |
Second part of m2m_wifi_init, continuing from where m2m_wifi_init_hold left off.
[in] | pWifiInitParam | This is a pointer to a variable of type tstrWifiInitParam which contains pointers to the application WIFI layer callback function (see tpfAppWifiCb), monitoring mode callback (see tpfAppEthCb) and tstrEthInitParam structure (which contains initialization settings for bypass mode). |
References tstrEthInitParam::au8ethRcvBuf, tstrWifiInitParam::GainTableIndex, gpfAppWifiCb, hif_enable_access(), hif_init(), hif_register_cb(), M2M_DRIVER_VERSION_MAJOR_NO, M2M_DRIVER_VERSION_MINOR_NO, M2M_DRIVER_VERSION_PATCH_NO, M2M_ERR_FAIL, M2M_HIF_BLOCK_VALUE, M2M_HIF_MAJOR_VALUE, M2M_HIF_MINOR_VALUE, M2M_INFO, m2m_ota_get_firmware_version(), M2M_REQ_GROUP_WIFI, M2M_SUCCESS, m2m_wifi_ble_set_gain_table(), m2m_wifi_cb(), m2m_wifi_get_firmware_version(), M2M_WIFI_MODE_NORMAL, nm_drv_deinit(), nm_drv_init_start(), NULL, tstrEthInitParam::pfAppEthCb, tstrWifiInitParam::pfAppWifiCb, tstrWifiInitParam::strEthInitParam, tstrEthInitParam::u16ethRcvBufSize, and tstrEthInitParam::u8EthernetEnable.
Referenced by m2m_wifi_init(), and m2m_wifi_reinit_start().
NMI_API sint8 m2m_wifi_reinit | ( | tstrWifiInitParam * | pWifiInitParam | ) |
De-initialize and then initialize wifi. Resets the WINC.
[in] | pWifiInitParam | This is a pointer to a variable of type tstrWifiInitParam which contains pointers to the application WIFI layer callback function (see tpfAppWifiCb), monitoring mode callback (see tpfAppEthCb) and tstrEthInitParam structure (which contains initialization settings for bypass mode). |
References M2M_ERR_FAIL, M2M_SUCCESS, m2m_wifi_reinit_hold(), and m2m_wifi_reinit_start().
First part of m2m_wifi_reinit, up to the point of initializing SPI for flash access.
References m2m_wifi_deinit(), m2m_wifi_init_hold(), and NULL.
Referenced by m2m_wifi_reinit().
NMI_API sint8 m2m_wifi_reinit_start | ( | tstrWifiInitParam * | pWifiInitParam | ) |
Second part of m2m_wifi_reinit, continuing from where m2m_wifi_reinit_hold left off.
[in] | pWifiInitParam | This is a pointer to the tstrWifiInitParam structure which contains pointers to the application WIFI layer callback function (see tpfAppWifiCb), monitoring mode callback (see tpfAppEthCb) and tstrEthInitParam structure (which contains initialization settings for bypass mode). |
References m2m_wifi_init_start().
Referenced by m2m_wifi_reinit().