Provide CN translation

This commit is contained in:
Zhang Shuxian
2025-07-11 15:34:01 +08:00
parent 7b57540cc4
commit 3c012ee327
2 changed files with 34 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ The register names have been updated to use the ``XT_REG_`` prefix. Please use t
Power Management
----------------
In previous versions of ESP-IDF, the API :cpp:func:`esp_sleep_get_wakeup_cause` was used to retrieve the wakeup reason after the chip exited sleep. However, this function only returns one wakeup source, even if multiple sources were triggered simultaneously, which may cause users to miss other active wakeup events.
Since ESP-IDF v6.0, a new API :cpp:func:`esp_sleep_get_wakeup_causes` has been introduced. This function returns a bitmap representing all wakeup sources that caused the chip to exit sleep. Each bit corresponds to a value in the :cpp:type:`esp_sleep_wakeup_cause_t` enum (e.g., ESP_SLEEP_WAKEUP_TIMER, ESP_SLEEP_WAKEUP_EXT1, etc.). Users can check each wakeup source using bitwise operations.
@@ -46,10 +47,12 @@ Removed option for compiling bootloader with no optimization level (-O0, `CONFIG
Time
----
The deprecated ``{IDF_TARGET_NAME}/rtc.h`` header file has been removed. Please include the replacement ``esp_rtc_time.h`` instead.
HW-Support
----------
The deprecated ``soc_memory_types.h`` header file has been removed. Please include the replacement ``esp_memory_utils.h`` instead.
App Trace
@@ -64,9 +67,9 @@ FreeRTOS
The following deprecated FreeRTOS functions have been removed in ESP-IDF v6.0:
- :cpp:func:`xTaskGetAffinity` - Use :cpp:func:`xTaskGetCoreID` instead
- :cpp:func:`xTaskGetIdleTaskHandleForCPU` - Use :cpp:func:`xTaskGetIdleTaskHandleForCore` instead
- :cpp:func:`xTaskGetCurrentTaskHandleForCPU` - Use :cpp:func:`xTaskGetCurrentTaskHandleForCore` instead
- :cpp:func:`xTaskGetAffinity` Use :cpp:func:`xTaskGetCoreID` instead.
- :cpp:func:`xTaskGetIdleTaskHandleForCPU` Use :cpp:func:`xTaskGetIdleTaskHandleForCore` instead.
- :cpp:func:`xTaskGetCurrentTaskHandleForCPU` Use :cpp:func:`xTaskGetCurrentTaskHandleForCore` instead.
**Deprecated Functions**

View File

@@ -12,9 +12,12 @@ Xtensa 特殊寄存器头文件已更新,使用新的命名约定。旧的 ``s
电源管理
--------
在旧版本的 ESP-IDF 中,使用 :cpp:func:`esp_sleep_get_wakeup_cause` API 获取芯片从睡眠中唤醒的原因,然而,该函数在多个唤醒源同时激活的情况下,只会返回其中一个唤醒源,可能导致用户遗漏其他同时发生的唤醒条件。
自 v6.0 版本起ESP-IDF 新增 :cpp:func:`esp_sleep_get_wakeup_causes` API此函数返回一个 bitmap表示所有触发唤醒的唤醒源。每一位对应 :cpp:type:`esp_sleep_wakeup_cause_t` 枚举中的一个值(例如 ESP_SLEEP_WAKEUP_TIMER、ESP_SLEEP_WAKEUP_EXT1 等),用户可以通过按位与操作判断是否被对应源唤醒。
原先的 :cpp:func:`esp_sleep_get_wakeup_cause()` 函数现已标记为 已废弃deprecated建议用户迁移至新接口未来版本中该函数可能会被移除。用户可按以下示例进行迁移
原先的 :cpp:func:`esp_sleep_get_wakeup_cause()` 函数现已标记为已弃用,建议用户迁移至新接口。未来版本中,该函数可能会被移除。用户可按以下示例进行迁移:
旧代码:
@@ -37,6 +40,26 @@ Xtensa 特殊寄存器头文件已更新,使用新的命名约定。旧的 ``s
handle_timer_wakeup();
}
引导加载程序
------------
已移除使用无优化等级 (-O0, `CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE`) 编译引导加载程序的选项。在大多数芯片上,使用 -O0 编译引导加载程序已无法成功,因为 IRAM 段会溢出。对于调试目的,推荐使用 -Og (:ref:`CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG<CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG>`) 优化等级,它在优化效果与可调试性之间提供了良好的平衡。
时间管理
--------
已弃用的头文件 ``{IDF_TARGET_NAME}/rtc.h`` 已被移除,请改用替代头文件 ``esp_rtc_time.h``
硬件支持
--------
已弃用的头文件 ``soc_memory_types.h`` 已被移除,请改用替代头文件 ``esp_memory_utils.h``
App Trace
----------
已移除额外数据缓冲选项。不再支持 `CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX` 配置项。
FreeRTOS
--------
@@ -44,10 +67,10 @@ FreeRTOS
以下已弃用的 FreeRTOS 函数已在 ESP-IDF v6.0 中移除:
- :cpp:func:`xTaskGetAffinity` - 请使用 :cpp:func:`xTaskGetCoreID` 替代
- :cpp:func:`xTaskGetIdleTaskHandleForCPU` - 请使用 :cpp:func:`xTaskGetIdleTaskHandleForCore` 替代
- :cpp:func:`xTaskGetCurrentTaskHandleForCPU` - 请使用 :cpp:func:`xTaskGetCurrentTaskHandleForCore` 替代
- :cpp:func:`xTaskGetAffinity` 请使用 :cpp:func:`xTaskGetCoreID` 替代
- :cpp:func:`xTaskGetIdleTaskHandleForCPU` 请使用 :cpp:func:`xTaskGetIdleTaskHandleForCore` 替代
- :cpp:func:`xTaskGetCurrentTaskHandleForCPU` 请使用 :cpp:func:`xTaskGetCurrentTaskHandleForCore` 替代
**已弃用的函数**
函数 :cpp:func:`pxTaskGetStackStart`弃用。请使用 :cpp:func:`xTaskGetStackStart` 替代以提高类型安全性。
函数 :cpp:func:`pxTaskGetStackStart` 已弃用。请使用 :cpp:func:`xTaskGetStackStart` 替代以提高类型安全性。