Merge branch 'docs/update_application_examples_sleep' into 'master'

docs: update application examples for sleep_modes.rst and deep-sleep-stub.rst

See merge request espressif/esp-idf!32256
This commit is contained in:
Zhang Xiao Yan 2024-07-24 17:31:27 +08:00
commit 8b51fd2395
4 changed files with 20 additions and 26 deletions

View File

@ -149,11 +149,9 @@ You can enable the Kconfig option :ref:`CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_
All of the above functions are declared in :component_file:`esp_hw_support/include/esp_sleep.h`.
Example
-------
Application Examples
--------------------
.. only:: SOC_RTC_FAST_MEM_SUPPORTED
ESP-IDF provides an example to show how to implement the Deep-sleep wake stub.
- :example:`system/deep_sleep_wake_stub`
- :example:`system/deep_sleep_wake_stub` demonstrates how to use the Deep-sleep wake stub on {IDF_TARGET_NAME} to quickly perform some tasks (the wake stub code) immediately after wake-up before going back to sleep.

View File

@ -466,18 +466,17 @@ Checking Sleep Wakeup Cause
For ext1 wakeup sources, it is possible to identify which touch pin has caused wakeup using :cpp:func:`esp_sleep_get_ext1_wakeup_status` functions.
Application Example
-------------------
Application Examples
--------------------
.. list::
- :example:`protocols/sntp`: the implementation of basic functionality of Deep-sleep, where ESP module is periodically waken up to retrieve time from NTP server.
- :example:`wifi/power_save`: the usage of Wi-Fi Modem-sleep mode and automatic Light-sleep feature to maintain Wi-Fi connections.
:SOC_BT_SUPPORTED: - :example:`bluetooth/nimble/power_save`: the usage of Bluetooth Modem-sleep mode and automatic Light-sleep feature to maintain Bluetooth connections.
:SOC_ULP_SUPPORTED: - :example:`system/deep_sleep`: the usage of various Deep-sleep wakeup triggers and ULP coprocessor programming.
:not SOC_ULP_SUPPORTED: - :example:`system/deep_sleep`: the usage of Deep-sleep wakeup triggered by various sources supported by the chip (RTC Timer, GPIO, EXT0, EXT1, Touch Sensor, etc.).
- :example:`system/light_sleep`: the usage of Light-sleep wakeup triggered by various sources supported by the chip (Timer, GPIO, Touch Sensor, etc.).
- :example:`protocols/sntp` demonstrates the implementation of basic functionality of Deep-sleep, where ESP module is periodically waken up to retrieve time from NTP server.
- :example:`wifi/power_save` demonstrates the usage of Wi-Fi Modem-sleep mode and automatic Light-sleep feature to maintain Wi-Fi connections.
:SOC_BT_SUPPORTED: - :example:`bluetooth/nimble/power_save` demonstrates the usage of Bluetooth Modem-sleep mode and automatic Light-sleep feature to maintain Bluetooth connections.
:SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` demonstrates the usage of various Deep-sleep wakeup triggers and ULP coprocessor programming.
:not SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` demonstrates the usage of Deep-sleep wakeup triggered by various sources, such as the RTC timer, GPIOs, EXT0, EXT1, the touch sensor, supported by {IDF_TARGET_NAME}.
- :example:`system/light_sleep` demonstrates the usage of Light-sleep wakeup triggered by various sources, such as the timer, GPIOs, the touch sensor, supported by {IDF_TARGET_NAME}.
API Reference
-------------

View File

@ -149,11 +149,9 @@ Deep-sleep 唤醒存根
上述所有函数在 :component_file:`esp_hw_support/include/esp_sleep.h` 中声明。
示例
----
应用示例
---------------
.. only:: SOC_RTC_FAST_MEM_SUPPORTED
ESP-IDF 提供了一个实现 Deep-sleep 唤醒存根的示例。
- :example:`system/deep_sleep_wake_stub`
- :example:`system/deep_sleep_wake_stub` 演示如何使用 {IDF_TARGET_NAME} 上的深度睡眠唤醒存根,以便在唤醒后立即执行一些任务(唤醒存根代码),然后再返回睡眠状态。

View File

@ -471,13 +471,12 @@ UART 输出处理
.. list::
- :example:`protocols/sntp`:如何实现 Deep-sleep 模式的基本功能,周期性唤醒 ESP 模块,以从 NTP 服务器获取时间。
- :example:`wifi/power_save`:如何通过 Wi-Fi Modem-sleep 模式和自动 Light-sleep 模式保持 Wi-Fi 连接。
:SOC_BT_SUPPORTED: - :example:`bluetooth/nimble/power_save`:如何通过 Bluetooth Modem-sleep 模式和自动 Light-sleep 模式保持 Bluetooth 连接。
:SOC_ULP_SUPPORTED: - :example:`system/deep_sleep`:如何使用 Deep-sleep 唤醒触发器和 ULP 协处理器编程。
:not SOC_ULP_SUPPORTED: - :example:`system/deep_sleep`:如何通过多种芯片支持的唤醒源,如 RTC 定时器, GPIO, EXT0, EXT1, 触摸传感器等,触发 Deep-sleep 唤醒。
- :example:`system/light_sleep`: 如何使用多种芯片支持的唤醒源如定时器GPIO触摸传感器等触发 Light-sleep 唤醒。
- :example:`protocols/sntp` 演示如何实现 Deep-sleep 模式的基本功能,周期性唤醒 ESP 模块,以从 NTP 服务器获取时间。
- :example:`wifi/power_save` 演示如何通过 Wi-Fi Modem-sleep 模式和自动 Light-sleep 模式保持 Wi-Fi 连接。
:SOC_BT_SUPPORTED: - :example:`bluetooth/nimble/power_save` 演示如何通过 Bluetooth Modem-sleep 模式和自动 Light-sleep 模式保持 Bluetooth 连接。
:SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` 演示如何使用 Deep-sleep 唤醒触发器和 ULP 协处理器编程。
:not SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` 演示如何通过 {IDF_TARGET_NAME} 的唤醒源,如 RTC 定时器, GPIO, EXT0, EXT1, 触摸传感器等,触发 Deep-sleep 唤醒。
- :example:`system/light_sleep` 演示如何使用 {IDF_TARGET_NAME} 的唤醒源如定时器GPIO触摸传感器等触发 Light-sleep 唤醒。
API 参考
-------------