From 645e5657c6b562b29256bca614cf34901d59b442 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Wed, 20 Jul 2022 17:45:10 +0800 Subject: [PATCH] update doc for set channel --- components/esp_wifi/include/esp_wifi.h | 3 +++ docs/en/api-guides/wifi.rst | 4 ++-- docs/zh_CN/api-guides/wifi.rst | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index d20991cd6a..1e61050042 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -580,6 +580,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -789,6 +791,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index e8b786c88d..9be9ad0f10 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -1197,7 +1197,7 @@ Call :cpp:func:`esp_wifi_set_mode()` to set the Wi-Fi mode. Station Basic Configuration +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() can be used to configure the station. The table below describes the fields in detail. +API :cpp:func:`esp_wifi_set_config()` can be used to configure the station. And the configuration will be stored in NVS. The table below describes the fields in detail. .. list-table:: :header-rows: 1 @@ -1236,7 +1236,7 @@ API esp_wifi_set_config() can be used to configure the station. The table below AP Basic Configuration +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() can be used to configure the AP. The table below describes the fields in detail. +API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the configuration will be stored in NVS. The table below describes the fields in detail. .. only:: esp32 or esp32s2 or esp32c3 or esp32s3 diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index 605ea1b6ae..ab4f79e5a9 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -1197,7 +1197,7 @@ Wi-Fi 模式 station 基本配置 +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() 可用于配置 station。下表详细介绍了各个字段。 +API :cpp:func:`esp_wifi_set_config()` 可用于配置 station。配置的参数信息会保存到 NVS 中。下表详细介绍了各个字段。 .. list-table:: :header-rows: 1 @@ -1236,7 +1236,7 @@ API esp_wifi_set_config() 可用于配置 station。下表详细介绍了各个 AP 基本配置 +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() 可用于配置 AP。下表详细介绍了各个字段。 +API :cpp:func:`esp_wifi_set_config()` 可用于配置 AP。配置的参数信息会保存到 NVS 中。下表详细介绍了各个字段。 .. only:: esp32 or esp32s2 or esp32c3 or esp32s3