Here are listed all the functions that implement the Wlan Initialization APIs.
Functions | |
sint8 | m2m_wifi_deinit (void *arg) |
De-initialize the WINC driver and host interface. More... | |
sint8 | m2m_wifi_download_mode () |
Prepares the WINC board before downloading any data (Firmware, Certificates, etc). More... | |
uint8 | m2m_wifi_get_state (void) |
Get the wifi state. More... | |
sint8 | m2m_wifi_init (tstrWifiInitParam *pWifiInitParam) |
Synchronous API to initialize the WINC driver. More... | |
sint8 | m2m_wifi_init_hold () |
First part of m2m_wifi_init, up to the point of initializing SPI for flash access. More... | |
sint8 | m2m_wifi_init_start (tstrWifiInitParam *pWifiInitParam) |
Second part of m2m_wifi_init, continuing from where m2m_wifi_init_hold left off. More... | |
sint8 | m2m_wifi_reinit (tstrWifiInitParam *pWifiInitParam) |
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 *pWifiInitParam) |
Second part of m2m_wifi_reinit, continuing from where m2m_wifi_reinit_hold left off. More... | |
De-initialize the WINC driver and host interface.
Synchronous 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. No arguments are expected to be passed in.
[in] | arg | Opaque argument, not used in current implementation. Application should use null. |
References gu8WifiState, hif_deinit(), M2M_SUCCESS, nm_drv_deinit(), NULL, and WIFI_STATE_DEINIT.
Referenced by burn_certificates(), m2m_wifi_reinit_hold(), and wifi_ap_provision().
NMI_API void m2m_wifi_download_mode | ( | void | ) |
Prepares the WINC board before downloading any data (Firmware, Certificates, etc).
This function should be called before attempting to download any data to the WINC board. 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(), gu8WifiState, M2M_SUCCESS, nm_drv_init_download_mode(), and WIFI_STATE_INIT.
Referenced by burn_certificates(), and enter_wifi_firmware_download().
Get the wifi state.
References gu8WifiState.
Referenced by m2m_ota_host_file_read_spi().
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 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). |
References M2M_SUCCESS, m2m_wifi_init_hold(), and m2m_wifi_init_start().
Referenced by main(), and wifi_ap_provision().
First part of m2m_wifi_init, up to the point of initializing SPI for flash access.
References gu8WifiState, M2M_ERR_FAIL, M2M_SUCCESS, nm_drv_init_hold(), and WIFI_STATE_INIT.
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, tstrM2mRev::BuildDate, tstrM2mRev::BuildTime, gpfAppWifiCb, gu8scanInProgress, gu8WifiState, hif_init(), hif_register_cb(), M2M_ERR, M2M_ERR_FAIL, M2M_ERR_FW_VER_MISMATCH, M2M_INFO, M2M_RELEASE_VERSION_MAJOR_NO, M2M_RELEASE_VERSION_MINOR_NO, M2M_RELEASE_VERSION_PATCH_NO, M2M_REQ_GROUP_WIFI, M2M_SUCCESS, m2m_wifi_cb(), M2M_WIFI_MODE_ETHERNET, M2M_WIFI_MODE_NORMAL, nm_drv_deinit(), nm_drv_init_start(), nm_get_firmware_full_info(), NULL, tstrEthInitParam::pfAppEthCb, tstrWifiInitParam::pfAppWifiCb, tstrWifiInitParam::strEthInitParam, tstrEthInitParam::u16ethRcvBufSize, tstrM2mRev::u16FirmwareSvnNum, tstrM2mRev::u8DriverMajor, tstrM2mRev::u8DriverMinor, tstrM2mRev::u8DriverPatch, tstrEthInitParam::u8EthernetEnable, tstrM2mRev::u8FirmwareMajor, tstrM2mRev::u8FirmwareMinor, tstrM2mRev::u8FirmwarePatch, WIFI_STATE_DEINIT, and WIFI_STATE_START.
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_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().