Skip to main content

esp_wifi_set_bandwidths

Function esp_wifi_set_bandwidths 

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

@brief Set the bandwidth of specified interface and specified band

@attention 1. WIFI_BW_HT40 is supported only when the interface support 11N @attention 2. When the interface supports 11AX/11AC, it only supports setting WIFI_BW_HT20. @attention 3. When the WiFi band mode is set to 2.4G only, it will not set 5G bandwidth @attention 4. When the WiFi band mode is set to 5G only, it will not set 2.4G bandwidth

@param ifx interface to be configured @param bw WiFi bandwidths include 2.4G bandwidth and 5G bandwidth

@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
  • others: refer to error codes in esp_err.h