Common#
Functions#
Initialize the Wi-Fi device.
De-initialize the Wi-Fi device.
Check if Wi-Fi interface is up.
Return the firmware version running on the Wi-Fi device.
Return Wi-Fi operational statistics.
Set the default interface.
Get the default interface.
Get the Wi-Fi interface MAC address.
Set the Wi-Fi interface MAC address.
Function Documentation#
sl_wifi_init#
sl_status_t sl_wifi_init (const sl_wifi_device_configuration_t * configuration, sl_wifi_event_handler_t event_handler)
Initialize the Wi-Fi device.
[in] | configuration | sl_wifi_device_configuration_t object that contains Wi-Fi device configuration. |
[in] | event_handler | Wi-Fi event handler function. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
Note
This function should be called before calling any other sl_wifi functions.
60
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_deinit#
sl_status_t sl_wifi_deinit (void )
De-initialize the Wi-Fi device.
N/A |
sl_wifi_init should be called before this API.
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
70
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_is_interface_up#
bool sl_wifi_is_interface_up (sl_wifi_interface_t interface)
Check if Wi-Fi interface is up.
[in] | interface | Wi-Fi interface as identified by sl_wifi_interface_t |
sl_wifi_init should be called before this API.
Returns
true: interface is up.
false: interface is down.
83
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_get_firmware_version#
sl_status_t sl_wifi_get_firmware_version (sl_wifi_version_string_t * version)
Return the firmware version running on the Wi-Fi device.
[out] | version | sl_wifi_version_string_t object that contains the version string. |
sl_wifi_init should be called before this API.
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
95
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_get_statistics#
sl_status_t sl_wifi_get_statistics (sl_wifi_interface_t interface, sl_wifi_statistics_t * statistics)
Return Wi-Fi operational statistics.
[in] | interface | Wi-Fi interface as identified by sl_wifi_interface_t |
[out] | statistics | sl_wifi_statistics_t object that contains Wi-Fi statistics. |
sl_wifi_init should be called before this API.
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
109
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_set_default_interface#
void sl_wifi_set_default_interface (sl_wifi_interface_t interface)
Set the default interface.
[in] | interface | Wi-Fi interface as identified by sl_wifi_interface_t |
Used by API when SL_WIFI_DEFAULT_INTERFACE is provided.
118
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_get_default_interface#
sl_wifi_interface_t sl_wifi_get_default_interface (void )
Get the default interface.
N/A |
sl_wifi_init should be called before this API.
Returns
sl_wifi_interface_t previously set by sl_wifi_set_default_interface
128
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_get_mac_address#
sl_status_t sl_wifi_get_mac_address (sl_wifi_interface_t interface, sl_mac_address_t * mac)
Get the Wi-Fi interface MAC address.
[in] | interface | Wi-Fi interface as identified by sl_wifi_interface_t |
[out] | mac | sl_mac_address_t object that contains the MAC address of the interface. |
sl_wifi_init should be called before this API.
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
142
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_set_mac_address#
sl_status_t sl_wifi_set_mac_address (sl_wifi_interface_t interface, const sl_mac_address_t * mac)
Set the Wi-Fi interface MAC address.
[in] | interface | Wi-Fi interface as identified by sl_wifi_interface_t |
[in] | mac | sl_mac_address_t object to store the MAC address. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
Note
This API is not supported by RS9116, Si917 when called directly due to firmware constraints. Alternatively, sl_wifi_init can be used to configure the MAC address. sl_wifi_init ensures the appropriate state of firmware and calls this API to set MAC address.
157
of file components/protocol/wifi/inc/sl_wifi.h