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.
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_device_context_t * device_context, 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] | device_context | Reserved for future use. |
[in] | event_handler | Wi-Fi event handler function of type sl_wifi_event_handler_t. |
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.
62
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 |
Pre-conditions:
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.
75
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 |
Pre-conditions:
sl_wifi_init should be called before this API.
Returns
true: interface is up.
false: interface is down.
89
of file components/protocol/wifi/inc/sl_wifi.h
sl_wifi_get_firmware_version#
sl_status_t sl_wifi_get_firmware_version (sl_wifi_firmware_version_t * version)
Return the firmware version running on the Wi-Fi device.
[out] | version | sl_wifi_firmware_version_t object that contains the version string. |
Pre-conditions:
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.
102
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.
111
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 |
Pre-conditions:
sl_wifi_init should be called before this API.
Returns
sl_wifi_interface_t previously set by sl_wifi_set_default_interface
122
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. |
Pre-conditions:
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.
137
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.
152
of file components/protocol/wifi/inc/sl_wifi.h