Skip to content

Commit

Permalink
fix(wifi): fix code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxiao111 committed Aug 30, 2024
1 parent 506bff2 commit 7c9109d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion components/esp_phy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(${idf_target} STREQUAL "linux")
endif()

if(IDF_TARGET STREQUAL "esp32p4")
# TODO: IDF-7460, IDF-8851, IDF-9553
# TODO: IDF-7460
idf_component_register()
return()
endif()
Expand Down
4 changes: 2 additions & 2 deletions components/esp_phy/esp32c61/phy_init_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const char __attribute__((section(".rodata"))) phy_init_magic_pre[] = PHY_INIT_M
* @brief Structure containing default recommended PHY initialization parameters.
*/
const esp_phy_init_data_t phy_init_data= { {
0x1,
0x1,
0x0,
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 0x50),
Expand Down Expand Up @@ -96,7 +96,7 @@ const esp_phy_init_data_t phy_init_data= { {
0,
0,
0,
0,
0,
0,
0,
0,
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/include/local/esp_wifi_types_native.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern "C" {
#if CONFIG_IDF_TARGET_ESP32C2
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3/ESP32C6/ESP32C5/ESP32C61 soft-AP */
#else
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_wifi/lib
Submodule lib updated 63 files
+1 −0 .gitlab-ci.yml
+ esp32/libcore.a
+ esp32/libespnow.a
+ esp32/libmesh.a
+ esp32/libnet80211.a
+ esp32/libpp.a
+ esp32/libsmartconfig.a
+ esp32/libwapi.a
+ esp32_host/libcore.a
+ esp32_host/libespnow.a
+ esp32_host/libmesh.a
+ esp32_host/libnet80211.a
+ esp32_host/libpp.a
+ esp32_host/libsmartconfig.a
+ esp32_host/libwapi.a
+ esp32c2/libcore.a
+ esp32c2/libespnow.a
+ esp32c2/libnet80211.a
+ esp32c2/libpp.a
+ esp32c2/libsmartconfig.a
+ esp32c3/libcore.a
+ esp32c3/libespnow.a
+ esp32c3/libmesh.a
+ esp32c3/libnet80211.a
+ esp32c3/libpp.a
+ esp32c3/libsmartconfig.a
+ esp32c3/libwapi.a
+ esp32c5/libcore.a
+ esp32c5/libespnow.a
+ esp32c5/libmesh.a
+ esp32c5/libnet80211.a
+ esp32c5/libpp.a
+ esp32c5/libsmartconfig.a
+ esp32c5/libwapi.a
+ esp32c6/libcore.a
+ esp32c6/libespnow.a
+ esp32c6/libmesh.a
+ esp32c6/libnet80211.a
+ esp32c6/libpp.a
+ esp32c6/libsmartconfig.a
+ esp32c6/libwapi.a
+ esp32c61/libcore.a
+ esp32c61/libespnow.a
+ esp32c61/libmesh.a
+ esp32c61/libnet80211.a
+ esp32c61/libpp.a
+ esp32c61/libsmartconfig.a
+ esp32c61/libwapi.a
+ esp32s2/libcore.a
+ esp32s2/libespnow.a
+ esp32s2/libmesh.a
+ esp32s2/libnet80211.a
+ esp32s2/libpp.a
+ esp32s2/libsmartconfig.a
+ esp32s2/libwapi.a
+ esp32s3/libcore.a
+ esp32s3/libespnow.a
+ esp32s3/libmesh.a
+ esp32s3/libnet80211.a
+ esp32s3/libpp.a
+ esp32s3/libsmartconfig.a
+ esp32s3/libwapi.a
+2 −2 fix_printf.sh
32 changes: 16 additions & 16 deletions docs/en/api-guides/low-power-mode/low-power-mode-wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Introduction to Low Power Mode in Wi-Fi Scenarios

After the previous introduction to low power mode from a systemic perspective, this section delves into low power mode in Wi-Fi scenarios. Due to the complexity of Wi-Fi scenarios, basic principles of Wi-Fi power saving will be introduced before specific low power mode. This section is focused on station mode.

Choosing Low Power Mode in Wi-Fi Scenarios
---------------------------------------------
.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc
To help users select appropriate low power mode, a summary table of low power modes in Wi-Fi scenarios is provided before detailed introduction.
.. only:: not esp32c5 and not esp32c61

.. todo - add sleep-current/esp32c5_summary.inc
Choosing Low Power Mode in Wi-Fi Scenarios
---------------------------------------------

.. only:: not esp32c5 and not esp32c61
To help users select appropriate low power mode, a summary table of low power modes in Wi-Fi scenarios is provided before detailed introduction.

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc

.. note::
.. note::

All currents in the table are average currents, and the terms in the table are explained in the following text. Users can refer to them as needed.

Expand Down Expand Up @@ -363,29 +363,29 @@ Modem-sleep Mode Configuration
* - ``light_sleep_enable``
- false

- Configuration Performance
.. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc
.. todo - add sleep-current/esp32c5_modem_sleep.inc
.. only:: not esp32c5 and not esp32c61

.. only:: not esp32c5 and not esp32c61
- Configuration Performance

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc


Auto Light-sleep Mode + Wi-Fi Scenario Configuration
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Auto Light-sleep mode in Wi-Fi scenarios does not require wake-up source configuration compared with a pure system. But the remaining part of configuration is basically the same in the two operation scenarios. Therefore, detailed introduction of configurable options, configuration steps, and recommended configurations can be found in the previous section :ref:`Deep-sleep Mode`, with the Wi-Fi-related configurations set to default.

- Configuration Performance
.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc
The configuration performance mirrors that of the recommended Auto Light-sleep mode configuration in a pure system, combined with the default Wi-Fi-related configurations in the Wi-Fi environment.
.. only:: not esp32c5 and not esp32c61

.. todo - add sleep-current/esp32c5_light_sleep.inc
- Configuration Performance

.. only:: not esp32c5 and not esp32c61
The configuration performance mirrors that of the recommended Auto Light-sleep mode configuration in a pure system, combined with the default Wi-Fi-related configurations in the Wi-Fi environment.

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc

Deep-sleep Mode + Wi-Fi Scenario Configuration
++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
33 changes: 17 additions & 16 deletions docs/zh_CN/api-guides/low-power-mode/low-power-mode-wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ Wi-Fi 场景下低功耗模式介绍

本节将结合纯系统下的功耗模式来介绍 Wi-Fi 场景下的低功耗模式。因为 Wi-Fi 场景的复杂性,本节会首先介绍 Wi-Fi 省电的基本原理,然后再介绍具体的低功耗模式。本节主要针对 station 模式。

Wi-Fi 场景如何选择低功耗模式
--------------------------------------
.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc
在介绍具体内容前先给出 Wi-Fi 场景下低功耗模式总结表,以方便用户根据需求快速选择想要了解的内容,选择合适的低功耗模式。
.. only:: not esp32c5 and not esp32c61

.. todo - add sleep-current/esp32c5_summary.inc
Wi-Fi 场景如何选择低功耗模式
--------------------------------------

.. only:: not esp32c5 and not esp32c61
在介绍具体内容前先给出 Wi-Fi 场景下低功耗模式总结表,以方便用户根据需求快速选择想要了解的内容,选择合适的低功耗模式。

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc

.. note::
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_summary.inc

.. note::

上表中所有电流均为平均电流,表中术语在下文均有介绍,用户可根据需求进行查看。

Expand Down Expand Up @@ -363,29 +364,29 @@ Modem-sleep 模式配置
* - ``light_sleep_enable``
- false

- 配置表现
.. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc
.. todo - add sleep-current/esp32c5_modem_sleep.inc
.. only:: not esp32c5 and not esp32c61

.. only:: not esp32c5 and not esp32c61
- 配置表现

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_modem_sleep.inc


Auto Light-sleep 模式 + Wi-Fi 场景配置
+++++++++++++++++++++++++++++++++++++++++

Auto Light-sleep 在 Wi-Fi 场景下的配置比纯系统下少了唤醒源的配置要求,其余几乎与纯系统下配置一致,因此可配置选项、配置步骤、推荐配置的详细介绍可以参考上文 :ref:`Deep-sleep 模式`。同时 Wi-Fi 相关配置保持默认。

- 配置表现
.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc
该配置表现为 Auto Light-sleep 模式纯系统推荐配置 + 默认的 Wi-Fi 相关配置在 Wi-Fi 场景的表现。
.. only:: not esp32c5 and not esp32c61

.. todo - add sleep-current/esp32c5_light_sleep.inc
- 配置表现

.. only:: not esp32c5 and not esp32c61
该配置表现为 Auto Light-sleep 模式纯系统推荐配置 + 默认的 Wi-Fi 相关配置在 Wi-Fi 场景的表现。

.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc
.. include:: ../sleep-current/{IDF_TARGET_PATH_NAME}_light_sleep.inc

Deep-sleep 模式 + Wi-Fi 场景配置
+++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion examples/openthread/.build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

examples/openthread/ot_br:
enable:
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET not in ["esp32c5", "esp32c61"]
- if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET != "esp32c61"
disable_test:
- if: IDF_TARGET not in ["esp32s3"]
reason: only test on esp32s3
Expand Down
6 changes: 3 additions & 3 deletions examples/openthread/ot_br/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |

# OpenThread Border Router Example

Expand Down Expand Up @@ -52,7 +52,7 @@ Two ways are provided to setup the Thread Border Router in this example:

- Auto Start
Enable `OPENTHREAD_BR_AUTO_START`, configure the `CONFIG_EXAMPLE_WIFI_SSID` and `CONFIG_EXAMPLE_WIFI_PASSWORD` with your access point's ssid and psk.
The device will connect to Wi-Fi and form a Thread network automatically after bootup.
The device will connect to Wi-Fi and form a Thread network automatically after boot up.

- Manual mode
Disable `OPENTHREAD_BR_AUTO_START` and enable `OPENTHREAD_CLI_ESP_EXTENSION`. `wifi` command will be added for connecting the device to the Wi-Fi network.
Expand Down

0 comments on commit 7c9109d

Please sign in to comment.