Common#

Functions#

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.

sl_status_t

De-initialize the Wi-Fi device.

bool
sl_wifi_is_interface_up(sl_wifi_interface_t interface)

Check if Wi-Fi interface is up.

sl_status_t
sl_wifi_get_firmware_version(sl_wifi_version_string_t *version)

Return the firmware version running on the Wi-Fi device.

sl_status_t
sl_wifi_get_statistics(sl_wifi_interface_t interface, sl_wifi_statistics_t *statistics)

Return Wi-Fi operational statistics.

void
sl_wifi_set_default_interface(sl_wifi_interface_t interface)

Set the default interface.

Get the default interface.

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.

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.

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.

Parameters
[in]configuration

sl_wifi_device_configuration_t object that contains Wi-Fi device configuration.

[in]event_handler

Wi-Fi event handler function.

Returns

Note

  • This function should be called before calling any other sl_wifi functions.


Definition at line 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.

Parameters
N/A

Returns


Definition at line 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.

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

Returns

    1. true: interface is up.

    2. false: interface is down.


Definition at line 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.

Parameters
[out]version

sl_wifi_version_string_t object that contains the version string.

Returns


Definition at line 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.

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

[out]statistics

sl_wifi_statistics_t object that contains Wi-Fi statistics.

Returns


Definition at line 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.

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

Used by API when SL_WIFI_DEFAULT_INTERFACE is provided.


Definition at line 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.

Parameters
N/A

Returns


Definition at line 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.

Parameters
[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.

Returns


Definition at line 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.

Parameters
[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

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.


Definition at line 157 of file components/protocol/wifi/inc/sl_wifi.h