Common#

Functions#

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.

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_firmware_version_t *version)

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

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_device_context_t * device_context, 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]device_context

Reserved for future use.

[in]event_handler

Wi-Fi event handler function of type sl_wifi_event_handler_t.

Returns

Note

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


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

Parameters
N/A
  • Pre-conditions:

Returns


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

Parameters
[in]interface

Wi-Fi interface as identified by sl_wifi_interface_t

  • Pre-conditions:

Returns

    1. true: interface is up.

    2. false: interface is down.


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

Parameters
[out]version

sl_wifi_firmware_version_t object that contains the version string.

  • Pre-conditions:

Returns


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

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

Parameters
N/A
  • Pre-conditions:

Returns


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

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.

  • Pre-conditions:

Returns


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

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 152 of file components/protocol/wifi/inc/sl_wifi.h