Function esp_idf_svc::sys::esp_wifi_set_protocol

source ยท
pub unsafe extern "C" fn esp_wifi_set_protocol(
    ifx: u32,
    protocol_bitmap: u8,
) -> i32
Expand description

@brief Set protocol type of specified interface The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). if CONFIG_SOC_WIFI_HE_SUPPORT, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX).

@attention Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode

@param ifx interfaces @param protocol_bitmap WiFi protocol bitmap

@return

  • ESP_OK: succeed
  • ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  • ESP_ERR_WIFI_IF: invalid interface
  • others: refer to error codes in esp_err.h