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-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. |
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. |
Referenced by burn_certificates(), m2m_wifi_reinit_hold(), main(), and wifi_ap_provision().
NMI_API void m2m_wifi_download_mode | ( | void | ) |
Prepares the WINC before downloading any data (Firmware, Certificates, etc).
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. 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.
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.
Referenced by burn_certificates(), enter_wifi_firmware_download(), and main().
Get the wifi state.
Referenced by m2m_ota_host_file_read_spi(), and 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). |
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). |
Referenced by demo_start(), m2m_ble_wifi_init(), main(), wifi_ap_provision(), and winc_init().
First part of m2m_wifi_init, up to the point of initializing SPI for flash access.
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). |
[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). |
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). |
[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). |
First part of m2m_wifi_reinit, up to the point of initializing SPI for flash access.
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). |
[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). |
Referenced by m2m_wifi_reinit().