Skip to main content

esp_wifi_get_protocols

Function esp_wifi_get_protocols 

Source
pub unsafe extern "C" fn esp_wifi_get_protocols(
    ifx: u32,
    protocols: *mut wifi_protocols_t,
) -> i32
Expand description

@brief Get the current protocol of the specified interface and specified band

@attention 1. The 5G protocol 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 protocol @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G protocol

@param ifx interface @param[out] protocols store current WiFi protocols 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
  • others: refer to error codes in esp_err.h