Skip to main content

esp_wifi_get_bandwidths

Function esp_wifi_get_bandwidths 

Source
pub unsafe extern "C" fn esp_wifi_get_bandwidths(
    ifx: u32,
    bw: *mut wifi_bandwidths_t,
) -> i32
Expand description

@brief Get the bandwidth of specified interface and specified band

@attention 1. The 5G bandwidth can only be read when CONFIG_SOC_WIFI_SUPPORT_5G is enabled. @attention 2. When the WiFi band mode is set to 2.4G only, it will not get 5G bandwidth @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G bandwidth

@param ifx interface to be configured @param[out] bw store bandwidths of interface ifx

@return

  • ESP_OK: succeed
  • ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  • ESP_ERR_WIFI_IF: invalid interface
  • ESP_ERR_INVALID_ARG: invalid argument