From 08ea11fd4322773a1a70bf95c91b1b38f8742585 Mon Sep 17 00:00:00 2001 From: Linda Date: Mon, 22 Jul 2024 10:40:44 +0800 Subject: [PATCH] docs: update application examples for sleep_modes.rst and deep-sleep-stub.rst --- docs/en/api-guides/deep-sleep-stub.rst | 8 +++----- docs/en/api-reference/system/sleep_modes.rst | 17 ++++++++--------- docs/zh_CN/api-guides/deep-sleep-stub.rst | 8 +++----- docs/zh_CN/api-reference/system/sleep_modes.rst | 13 ++++++------- 4 files changed, 20 insertions(+), 26 deletions(-) diff --git a/docs/en/api-guides/deep-sleep-stub.rst b/docs/en/api-guides/deep-sleep-stub.rst index 9b08fa5532..b61e4cb65b 100644 --- a/docs/en/api-guides/deep-sleep-stub.rst +++ b/docs/en/api-guides/deep-sleep-stub.rst @@ -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. diff --git a/docs/en/api-reference/system/sleep_modes.rst b/docs/en/api-reference/system/sleep_modes.rst index faf68f80d7..e77aa30f04 100644 --- a/docs/en/api-reference/system/sleep_modes.rst +++ b/docs/en/api-reference/system/sleep_modes.rst @@ -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 ------------- diff --git a/docs/zh_CN/api-guides/deep-sleep-stub.rst b/docs/zh_CN/api-guides/deep-sleep-stub.rst index 9128122a49..a6baa39dd6 100644 --- a/docs/zh_CN/api-guides/deep-sleep-stub.rst +++ b/docs/zh_CN/api-guides/deep-sleep-stub.rst @@ -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} 上的深度睡眠唤醒存根,以便在唤醒后立即执行一些任务(唤醒存根代码),然后再返回睡眠状态。 diff --git a/docs/zh_CN/api-reference/system/sleep_modes.rst b/docs/zh_CN/api-reference/system/sleep_modes.rst index 76567ecffe..e0c5e02e98 100644 --- a/docs/zh_CN/api-reference/system/sleep_modes.rst +++ b/docs/zh_CN/api-reference/system/sleep_modes.rst @@ -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 参考 -------------