Merge branch 'docs/sync_en_and_cn_docs' into 'master'

docs: Sync CN and EN docs missing translation labels

Closes DOC-12424

See merge request espressif/esp-idf!42145
This commit is contained in:
Shen Meng Jing
2025-09-26 21:03:18 +08:00
16 changed files with 96 additions and 79 deletions

View File

@@ -1,10 +1,10 @@
BluFi BluFi
======= =====
:link_to_translation:`zh_CN:[中文]` :link_to_translation:`zh_CN:[中文]`
Overview Overview
---------- --------
The BluFi for {IDF_TARGET_NAME} is a Wi-Fi network configuration function via Bluetooth channel. It provides a secure protocol to pass Wi-Fi configuration and credentials to {IDF_TARGET_NAME}. Using this information, {IDF_TARGET_NAME} can then connect to an AP or establish a SoftAP. The BluFi for {IDF_TARGET_NAME} is a Wi-Fi network configuration function via Bluetooth channel. It provides a secure protocol to pass Wi-Fi configuration and credentials to {IDF_TARGET_NAME}. Using this information, {IDF_TARGET_NAME} can then connect to an AP or establish a SoftAP.
@@ -14,13 +14,13 @@ You can customize symmetric encryption, asymmetric encryption, and checksum supp
Getting Started Getting Started
----------------- ---------------
This section provides a step-by-step guide to configuring Wi-Fi on an {IDF_TARGET_NAME} device using the EspBlufi app. This section provides a step-by-step guide to configuring Wi-Fi on an {IDF_TARGET_NAME} device using the EspBlufi app.
Prerequisites Prerequisites
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
Hardware: Hardware:
@@ -41,10 +41,10 @@ For detailed instructions on flashing BluFi example, please refer to ESP-IDF :do
Configuring Wi-Fi via the EspBlufi App Configuring Wi-Fi via the EspBlufi App
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting {IDF_TARGET_NAME} to Station Mode Setting {IDF_TARGET_NAME} to Station Mode
############################################### #########################################
1. **Power on {IDF_TARGET_NAME}** 1. **Power on {IDF_TARGET_NAME}**
@@ -147,7 +147,7 @@ Setting {IDF_TARGET_NAME} to Station Mode
Setting {IDF_TARGET_NAME} as a SoftAP Setting {IDF_TARGET_NAME} as a SoftAP
############################################### #####################################
1. **Connect via EspBlufi** 1. **Connect via EspBlufi**
@@ -225,7 +225,7 @@ Setting {IDF_TARGET_NAME} as a SoftAP
The BluFi Flow The BluFi Flow
---------------- --------------
The BluFi networking flow includes the configuration of the SoftAP and Station. The BluFi networking flow includes the configuration of the SoftAP and Station.
@@ -258,7 +258,7 @@ The following uses Station as an example to illustrate the core parts of the pro
2. The data lengths before and after symmetric encryption/decryption must stay the same. It also supports in-place encryption and decryption. 2. The data lengths before and after symmetric encryption/decryption must stay the same. It also supports in-place encryption and decryption.
The Flow Chart of BluFi The Flow Chart of BluFi
------------------------- -----------------------
.. seqdiag:: .. seqdiag::
:caption: BluFi Flow Chart :caption: BluFi Flow Chart
@@ -287,7 +287,7 @@ The Flow Chart of BluFi
.. _frame_formats: .. _frame_formats:
The Frame Formats Defined in BluFi The Frame Formats Defined in BluFi
------------------------------------ ----------------------------------
The frame formats for the communication between the mobile phone App and {IDF_TARGET_NAME} are defined as follows: The frame formats for the communication between the mobile phone App and {IDF_TARGET_NAME} are defined as follows:
@@ -703,11 +703,12 @@ If you require a higher level of security, it is recommended to implement your o
esp_err_t esp_blufi_register_callbacks(esp_blufi_callbacks_t *callbacks) esp_err_t esp_blufi_register_callbacks(esp_blufi_callbacks_t *callbacks)
GATT Related Instructions GATT Related Instructions
---------------------------- -------------------------
UUID UUID
^^^^^ ^^^^
BluFi Service UUID: 0xFFFF, 16 bit BluFi Service UUID: 0xFFFF, 16 bit

View File

@@ -170,7 +170,6 @@ Change into the test app directory to configure and build it:
* ``idf.py menuconfig`` - configure unit test app. * ``idf.py menuconfig`` - configure unit test app.
* ``idf.py build`` - build unit test app. * ``idf.py build`` - build unit test app.
When the build finishes, it will print instructions for flashing the chip. You can simply run ``idf.py flash`` to flash all build output. When the build finishes, it will print instructions for flashing the chip. You can simply run ``idf.py flash`` to flash all build output.
Running Unit Tests Running Unit Tests

View File

@@ -157,6 +157,7 @@ The Ethernet driver is composed of two parts: MAC and PHY.
* Force the PHY device to reset status (as the case **a** in the picture). **This could fail for some PHY device** (i.e., it still outputs signals to GPIO0 even in reset state). * Force the PHY device to reset status (as the case **a** in the picture). **This could fail for some PHY device** (i.e., it still outputs signals to GPIO0 even in reset state).
.. warning:: .. warning::
If you want the **Ethernet to work with Wi-Fi or Bluetooth**, dont select ESP32 as source of ``REF_CLK`` as it would result in ``REF_CLK`` instability. Either disable Wi-Fi or use a PHY or an external oscillator as the ``REF_CLK`` source. If you want the **Ethernet to work with Wi-Fi or Bluetooth**, dont select ESP32 as source of ``REF_CLK`` as it would result in ``REF_CLK`` instability. Either disable Wi-Fi or use a PHY or an external oscillator as the ``REF_CLK`` source.
.. only:: not esp32 .. only:: not esp32

View File

@@ -1048,6 +1048,7 @@ There are two methods to allocate a pair of full-duplex channels:
ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_handle, &std_rx_cfg)); ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_handle, &std_rx_cfg));
ESP_ERROR_CHECK(i2s_channel_enable(rx_handle)); ESP_ERROR_CHECK(i2s_channel_enable(rx_handle));
.. only:: SOC_I2S_HW_VERSION_2 .. only:: SOC_I2S_HW_VERSION_2
Simplex Mode Simplex Mode

View File

@@ -6,7 +6,7 @@ Bluetooth Classic
Bluedroid Bluedroid
--------- ---------
The following Bluedroid API have been deprecated and removed: The following Bluedroid APIs have been deprecated and removed:
- :component_file:`/bt/host/bluedroid/api/include/api/esp_bt_device.h` - :component_file:`/bt/host/bluedroid/api/include/api/esp_bt_device.h`

View File

@@ -10,7 +10,7 @@ Starting with ESP-IDF v6.0, the build system no longer allows orphan sections in
.. note:: .. note::
An *orphan section* is a section that is not explicitly placed into any output section by the linker script and is not discarded during linking. An *orphan section* is a section that is not explicitly placed into any output section by the linker script and is not discarded during linking.
How to Resolve Orphan Section Errors How to Resolve Orphan Section Errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -23,7 +23,7 @@ If you encounter an orphan section error during linking, you can resolve it usin
.. warning:: .. warning::
The option 3 is **not recommended**, as orphan sections may indicate misconfigured memory mapping or unintentional behavior in your application. The option 3 is **not recommended**, as orphan sections may indicate misconfigured memory mapping or unintentional behavior in your application.
Change in Global Constructor Order Change in Global Constructor Order
---------------------------------- ----------------------------------
@@ -61,7 +61,7 @@ Example (from ``components/unity/unity_runner.c``):
.. note:: .. note::
This approach is suitable only for very specific cases. This approach is suitable only for very specific cases.
Use Constructor Priorities Use Constructor Priorities
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -184,20 +184,22 @@ LCD
- The ``on_bounce_frame_finish`` member in :cpp:type:`esp_lcd_rgb_panel_event_callbacks_t` has been replaced by :cpp:member:`esp_lcd_rgb_panel_event_callbacks_t::on_frame_buf_complete`, which indicates that a complete frame buffer has been sent to the LCD controller. - The ``on_bounce_frame_finish`` member in :cpp:type:`esp_lcd_rgb_panel_event_callbacks_t` has been replaced by :cpp:member:`esp_lcd_rgb_panel_event_callbacks_t::on_frame_buf_complete`, which indicates that a complete frame buffer has been sent to the LCD controller.
- The LCD IO layer driver for the I2C interface previously had two implementations, based on the new and legacy I2C master bus drivers. As the legacy I2C driver is being deprecated, support for it in the LCD IO layer has been removed. Only the APIs provided in ``driver/i2c_master.h`` are now used. - The LCD IO layer driver for the I2C interface previously had two implementations, based on the new and legacy I2C master bus drivers. As the legacy I2C driver is being deprecated, support for it in the LCD IO layer has been removed. Only the APIs provided in ``driver/i2c_master.h`` are now used.
- :cpp:member:`esp_lcd_dpi_panel_config_t::pixel_format` member is deprecated. It is recommended to only use :cpp:member:`esp_lcd_dpi_panel_config_t::in_color_format` to set the MIPI DSI driver's input pixel data format. - :cpp:member:`esp_lcd_dpi_panel_config_t::pixel_format` member is deprecated. It is recommended to only use :cpp:member:`esp_lcd_dpi_panel_config_t::in_color_format` to set the MIPI DSI driver's input pixel data format.
- The NT35510 LCD device driver has been moved out of ESP-IDF and is now hosted in the `ESP Component Registry <https://components.espressif.com/components/espressif/esp_lcd_nt35510/versions/1.0.0/readme>`_. If your project uses the NT35510 driver, you can add it to your project by running ``idf.py add-dependency "espressif/esp_lcd_nt35510"``. - The NT35510 LCD device driver has been moved out of ESP-IDF and is now hosted in the `ESP Component Registry <https://components.espressif.com/components/espressif/esp_lcd_nt35510/versions/1.0.0/readme>`__. If your project uses the NT35510 driver, you can add it to your project by running ``idf.py add-dependency "espressif/esp_lcd_nt35510"``.
SPI SPI
--- ---
- The :ref:`CONFIG_SPI_MASTER_IN_IRAM` option is now invisible by default in menuconfig and depends on :ref:`CONFIG_FREERTOS_IN_IRAM`. This change was made to prevent potential crashes when SPI functions in IRAM call FreeRTOS functions that are placed in flash. - The :ref:`CONFIG_SPI_MASTER_IN_IRAM` option is now invisible by default in menuconfig and depends on :ref:`CONFIG_FREERTOS_IN_IRAM`. This change was made to prevent potential crashes when SPI functions in IRAM call FreeRTOS functions that are placed in flash.
- To enable SPI master IRAM optimization: - To enable SPI master IRAM optimization:
1. Navigate to ``Component config````FreeRTOS````Port`` in menuconfig 1. Navigate to ``Component config````FreeRTOS````Port`` in menuconfig.
2. Enable ``Place FreeRTOS functions in IRAM`` (:ref:`CONFIG_FREERTOS_IN_IRAM`) 2. Enable ``Place FreeRTOS functions in IRAM`` (:ref:`CONFIG_FREERTOS_IN_IRAM`).
3. Navigate to ``Component config````ESP-Driver:SPI Configurations`` 3. Navigate to ``Component config````ESP-Driver:SPI Configurations`` in menuconfig.
4. Enable ``Place transmitting functions of SPI master into IRAM`` (:ref:`CONFIG_SPI_MASTER_IN_IRAM`) 4. Enable ``Place transmitting functions of SPI master into IRAM`` (:ref:`CONFIG_SPI_MASTER_IN_IRAM`).
- Note that enabling :ref:`CONFIG_FREERTOS_IN_IRAM` will increase IRAM usage. Consider this trade-off when optimizing for SPI performance. .. note::
Note that enabling :ref:`CONFIG_FREERTOS_IN_IRAM` will increase IRAM usage. Consider this trade-off when optimizing for SPI performance.
- Deprecated HSPI and VSPI related IOMUX pin macros on ESP32 and ESP32S2 have been removed. - Deprecated HSPI and VSPI related IOMUX pin macros on ESP32 and ESP32S2 have been removed.
@@ -206,7 +208,6 @@ PSRAM
Deprecated header file ``esp_spiram.h`` has been removed. Please use ``esp_psram.h`` instead. Deprecated header file ``esp_spiram.h`` has been removed. Please use ``esp_psram.h`` instead.
SPI Flash Driver SPI Flash Driver
---------------- ----------------
@@ -216,12 +217,14 @@ SPI Flash Driver
- Deprecated API ``spi_flash_get_counters`` has been removed. Please use :cpp:func:`esp_flash_get_counters` instead. - Deprecated API ``spi_flash_get_counters`` has been removed. Please use :cpp:func:`esp_flash_get_counters` instead.
- Deprecated API ``spi_flash_reset_counters`` has been removed. Please use :cpp:func:`esp_flash_reset_counters` instead. - Deprecated API ``spi_flash_reset_counters`` has been removed. Please use :cpp:func:`esp_flash_reset_counters` instead.
Note that enabling :ref:`CONFIG_FREERTOS_IN_IRAM` will increase IRAM usage. Consider this trade-off when optimizing for SPI performance. .. note::
Note that enabling :ref:`CONFIG_FREERTOS_IN_IRAM` will increase IRAM usage. Consider this trade-off when optimizing for SPI performance.
Touch Element Touch Element
------------- -------------
The ``touch_element`` component is moved to [ESP Component Registry](https://components.espressif.com/components/espressif/touch_element/versions/1.0.0/readme). The ``touch_element`` component is moved to `ESP Component Registry <https://components.espressif.com/components/espressif/touch_element/versions/1.0.0/readme>`__.
You can add this dependency to your project by running ``idf.py add-dependency "espressif/touch_element"``. You can add this dependency to your project by running ``idf.py add-dependency "espressif/touch_element"``.

View File

@@ -3,7 +3,6 @@ Protocols
:link_to_translation:`zh_CN:[中文]` :link_to_translation:`zh_CN:[中文]`
ESP-TLS ESP-TLS
------- -------
@@ -40,13 +39,13 @@ Since ESP-IDF version v6.0, the examples for component ``esp-modbus v1`` which i
The examples below demonstrate the ESP-Modbus library of serial and TCP ports for both slave and master implementations respectively. The examples below demonstrate the ESP-Modbus library of serial and TCP ports for both slave and master implementations respectively.
- `mb_serial_slave - demonstrates how to use {IDF_TARGET_NAME} as a Modbus serial slave device with the esp-modbus stack, enabling an external Modbus host to read and write device parameters using the Modbus protocol. <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_slave>`__ - `mb_serial_slave <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_slave>`__ - demonstrates how to use {IDF_TARGET_NAME} as a Modbus serial slave device with the esp-modbus stack, enabling an external Modbus host to read and write device parameters using the Modbus protocol.
- `mb_serial_master - demonstrates how to use the esp-modbus stack port on {IDF_TARGET_NAME} as a Modbus serial master device, capable of reading and writing values from slave devices in a Modbus segment. <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_master>`__ - `mb_serial_master <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_master>`__ - demonstrates how to use the esp-modbus stack port on {IDF_TARGET_NAME} as a Modbus serial master device, capable of reading and writing values from slave devices in a Modbus segment.
- `mb_tcp_slave - demonstrates the esp-modbus TCP slave stack port, allowing an external Modbus host to read and write device parameters via the Modbus protocol. <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_slave>`__ - `mb_tcp_slave <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_slave>`__ - demonstrates the esp-modbus TCP slave stack port, allowing an external Modbus host to read and write device parameters via the Modbus protocol.
- `mb_tcp_master` - demonstrates how to use the esp-modbus stack port on {IDF_TARGET_NAME} as a Modbus TCP master device, capable of reading and writing values from slave devices in a Modbus network. <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_master>`__ - `mb_tcp_master <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_master>`__ - demonstrates how to use the esp-modbus stack port on {IDF_TARGET_NAME} as a Modbus TCP master device, capable of reading and writing values from slave devices in a Modbus network.
Please refer to the ``README.md`` documents of each specific example for details. Please refer to the ``README.md`` documents of each specific example for details.

View File

@@ -1,10 +1,10 @@
BluFi BluFi
======= =====
:link_to_translation:`en:[English]` :link_to_translation:`en:[English]`
概览 概览
-------- ----
BluFi 是一项基于蓝牙通道的 Wi-Fi 网络配置功能,适用于 {IDF_TARGET_NAME}。它通过安全协议将 Wi-Fi 的 SSID、密码等配置信息传输到 {IDF_TARGET_NAME}。基于这些信息,{IDF_TARGET_NAME} 可进而连接到 AP 或建立 SoftAP。 BluFi 是一项基于蓝牙通道的 Wi-Fi 网络配置功能,适用于 {IDF_TARGET_NAME}。它通过安全协议将 Wi-Fi 的 SSID、密码等配置信息传输到 {IDF_TARGET_NAME}。基于这些信息,{IDF_TARGET_NAME} 可进而连接到 AP 或建立 SoftAP。
@@ -20,7 +20,7 @@ BluFi 流程的关键部分包括数据的分片、加密以及校验和验证
硬件及软件准备 硬件及软件准备
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
硬件: 硬件:
@@ -41,10 +41,10 @@ BluFi 流程的关键部分包括数据的分片、加密以及校验和验证
通过 EspBlufi 应用配置 Wi-Fi 通过 EspBlufi 应用配置 Wi-Fi
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Station 模式配置示例 Station 模式配置示例
################################### ####################
1. **给 {IDF_TARGET_NAME} 上电** 1. **给 {IDF_TARGET_NAME} 上电**
@@ -147,7 +147,7 @@ Station 模式配置示例
SoftAP 模式配置示例 SoftAP 模式配置示例
############################### ###################
1. **通过 EspBlufi 建立连接** 1. **通过 EspBlufi 建立连接**
@@ -225,7 +225,7 @@ SoftAP 模式配置示例
BluFi 流程 BluFi 流程
----------- ----------
BluFi 配网流程包含配置 SoftAP 和配置 Station 两部分。 BluFi 配网流程包含配置 SoftAP 和配置 Station 两部分。
@@ -287,7 +287,7 @@ BluFi 流程图
.. _frame_formats: .. _frame_formats:
BluFi 中定义的帧格式 BluFi 中定义的帧格式
--------------------- --------------------
手机应用程序与 {IDF_TARGET_NAME} 之间的 BluFi 通信格式定义如下: 手机应用程序与 {IDF_TARGET_NAME} 之间的 BluFi 通信格式定义如下:
@@ -643,7 +643,7 @@ ACK 帧格式 (8 bit)
此字段占两个字节,用来校验序列、数据长度以及明文。 此字段占两个字节,用来校验序列、数据长度以及明文。
{IDF_TARGET_NAME} 端的安全实现 {IDF_TARGET_NAME} 端的安全实现
----------------------------- ------------------------------
1. 数据安全 1. 数据安全
@@ -708,7 +708,7 @@ GATT 相关说明
------------- -------------
UUID UUID
^^^^^ ^^^^
BluFi Service UUID 0xFFFF16 bit BluFi Service UUID 0xFFFF16 bit

View File

@@ -168,17 +168,9 @@ DUT2 (slave) 终端::
切换到 ``tools/unit-test-app`` 目录下进行配置和编译: 切换到 ``tools/unit-test-app`` 目录下进行配置和编译:
* ``idf.py menuconfig`` - 配置单元测试程序。 * ``idf.py menuconfig`` - 配置单元测试程序。
* ``idf.py -T all build`` - 编译单元测试程序,测试每个组件 ``test`` 子目录下的用例 * ``idf.py build`` - 构建单元测试应用程序。
* ``idf.py -T "xxx yyy" build`` - 编译单元测试程序,对以空格分隔的特定组件进行测试(如 ``idf.py -T heap build`` - 仅对 ``heap`` 组件目录下的单元测试程序进行编译)。
* ``idf.py -T all -E "xxx yyy" build`` - 编译单元测试程序,测试除指定组件之外的所有组件(例如 ``idf.py -T all -E "ulp mbedtls" build`` - 编译所有的单元测试,不包括 ``ulp````mbedtls`` 组件。)。
.. note:: 构建完成后,终端会显示烧录芯片的操作说明。你可以直接运行 ``idf.py flash``,烧录所有构建输出。
由于 Windows 命令提示符固有限制,需使用以下语法来编译多个组件的单元测试程序:``idf.py -T xxx -T yyy build`` 或者在 PowerShell 中使用 ``idf.py -T \`"xxx yyy\`" build``,在 Windows 命令提示符中使用 ``idf.py -T \^"ssd1306 hts221\^" build``
当编译完成时,它会打印出烧写芯片的指令。你只需要运行 ``idf.py flash`` 即可烧写所有编译输出的文件。
你还可以运行 ``idf.py -T all flash`` 或者 ``idf.py -T xxx flash`` 来编译并烧写,所有需要的文件都会在烧写之前自动重新编译。
运行单元测试 运行单元测试
-------------- --------------

View File

@@ -148,7 +148,6 @@
当选择内部时钟时,可以使用 ``GPIO0`` 输出 ``REF_CLK`` 信号。然而,在这种情况下时钟是直接输出到 GPIO 的,因此与 EMAC 外设并没有直接关联。有时这种配置可能无法很好地兼容所使用的 PHY 芯片。如果设计中未使用 PSRAM则还可以使用 GPIO16 和 GPIO17 来输出参考时钟信号。其时钟源相同(均来自 APLL但这些信号是通过 EMAC 外设引出的。 当选择内部时钟时,可以使用 ``GPIO0`` 输出 ``REF_CLK`` 信号。然而,在这种情况下时钟是直接输出到 GPIO 的,因此与 EMAC 外设并没有直接关联。有时这种配置可能无法很好地兼容所使用的 PHY 芯片。如果设计中未使用 PSRAM则还可以使用 GPIO16 和 GPIO17 来输出参考时钟信号。其时钟源相同(均来自 APLL但这些信号是通过 EMAC 外设引出的。
如果配置 RMII 时钟模式为 :cpp:enumerator:`emac_rmii_clock_mode_t::EMAC_CLK_EXT_IN`,那么只能选择 ``GPIO0`` 输入 ``REF_CLK`` 信号。请注意, ``GPIO0`` 同时也是 ESP32 上一个重要的 strapping GPIO 管脚。如果上电时 GPIO0 为低电平,则 ESP32 将进入下载模式,需进行手动复位重启系统。解决这个问题的方法是,在硬件中默认禁用 ``REF_CLK``,从而避免 strapping 管脚在启动阶段受到其他信号的干扰。随后,再在以太网驱动安装阶段重新启用 ``REF_CLK`` 如果配置 RMII 时钟模式为 :cpp:enumerator:`emac_rmii_clock_mode_t::EMAC_CLK_EXT_IN`,那么只能选择 ``GPIO0`` 输入 ``REF_CLK`` 信号。请注意, ``GPIO0`` 同时也是 ESP32 上一个重要的 strapping GPIO 管脚。如果上电时 GPIO0 为低电平,则 ESP32 将进入下载模式,需进行手动复位重启系统。解决这个问题的方法是,在硬件中默认禁用 ``REF_CLK``,从而避免 strapping 管脚在启动阶段受到其他信号的干扰。随后,再在以太网驱动安装阶段重新启用 ``REF_CLK``
可以通过以下方法禁用 ``REF_CLK`` 信号: 可以通过以下方法禁用 ``REF_CLK`` 信号:
@@ -158,6 +157,7 @@
* 强制复位 PHY 设备(对应图中的选项 **a**)。**此种方法并不适用于所有 PHY 设备** (即便处于复位状态,某些 PHY 设备仍会向 GPIO0 输出信号)。 * 强制复位 PHY 设备(对应图中的选项 **a**)。**此种方法并不适用于所有 PHY 设备** (即便处于复位状态,某些 PHY 设备仍会向 GPIO0 输出信号)。
.. warning:: .. warning::
如希望 **以太网与 Wi-Fi 一起工作**,不要选择 ESP32 作为 ``REF_CLK`` 的源,因为这会导致 ``REF_CLK`` 不稳定。可以选择禁用 Wi-Fi或使用 PHY 或外部振荡器作为 ``REF_CLK`` 的源。 如希望 **以太网与 Wi-Fi 一起工作**,不要选择 ESP32 作为 ``REF_CLK`` 的源,因为这会导致 ``REF_CLK`` 不稳定。可以选择禁用 Wi-Fi或使用 PHY 或外部振荡器作为 ``REF_CLK`` 的源。
.. only:: not esp32 .. only:: not esp32

View File

@@ -988,6 +988,7 @@ STD RX 模式
... ...
.. only:: SOC_I2S_HW_VERSION_1 .. only:: SOC_I2S_HW_VERSION_1
单工模式 单工模式
@@ -1047,6 +1048,7 @@ STD RX 模式
ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_handle, &std_rx_cfg)); ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_handle, &std_rx_cfg));
ESP_ERROR_CHECK(i2s_channel_enable(rx_handle)); ESP_ERROR_CHECK(i2s_channel_enable(rx_handle));
.. only:: SOC_I2S_HW_VERSION_2 .. only:: SOC_I2S_HW_VERSION_2
单工模式 单工模式

View File

@@ -42,4 +42,3 @@ Bluedroid
- 结构体 ``esp_a2d_media_ctrl_t`` 中的字段 ``ESP_A2D_MEDIA_CTRL_STOP`` 被移除,该字段被 ``ESP_A2D_MEDIA_CTRL_SUSPEND`` 替代。 - 结构体 ``esp_a2d_media_ctrl_t`` 中的字段 ``ESP_A2D_MEDIA_CTRL_STOP`` 被移除,该字段被 ``ESP_A2D_MEDIA_CTRL_SUSPEND`` 替代。
- 结构体 ``esp_a2d_mcc_t`` 中的字段 ``sbc, m12, m24, atrac`` 被移除并由字段 ``bc_info, m12_info, m24_info , atrc_info`` 替代。 - 结构体 ``esp_a2d_mcc_t`` 中的字段 ``sbc, m12, m24, atrac`` 被移除并由字段 ``bc_info, m12_info, m24_info , atrc_info`` 替代。

View File

@@ -10,7 +10,7 @@
.. note:: .. note::
*孤立段* 是指未被链接脚本显式放置到任何输出段,且在链接过程中未被丢弃的段。 *孤立段* 是指未被链接脚本显式放置到任何输出段,且在链接过程中未被丢弃的段。
如何解决孤立段错误 如何解决孤立段错误
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
@@ -23,7 +23,7 @@
.. warning:: .. warning::
方案 3 **不推荐使用**,因为孤立段可能意味着内存映射配置存在问题,或应用程序中存在非预期行为。 **不推荐使用** 方案 3,因为孤立段可能意味着内存映射配置存在问题,或应用程序中存在非预期行为。
全局构造函数顺序变更 全局构造函数顺序变更
--------------------- ---------------------
@@ -61,7 +61,7 @@
.. note:: .. note::
此方案仅适用于特定场景。 此方案仅适用于特定场景。
使用构造函数优先级 使用构造函数优先级
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@@ -74,7 +74,6 @@
void foo(void); void foo(void);
``PRIO`` 替换为整数值。值越小,执行越早。当对执行顺序有特定要求时,这种方式是首选。 ``PRIO`` 替换为整数值。值越小,执行越早。当对执行顺序有特定要求时,这种方式是首选。
方案3 **不推荐使用**,因为孤立段可能意味着内存映射配置存在问题,或应用程序中存在非预期行为。
配置文件语法变更 配置文件语法变更
------------------ ------------------

View File

@@ -7,7 +7,7 @@
-------- --------
所有驱动的 ``io_loop_back`` 配置已被移除 所有驱动的 ``io_loop_back`` 配置已被移除
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
不同的驱动对象可以共享同一个 GPIO 编号,联合起来可以实现更加复杂的功能。比如将 RMT 外设的 TX 通道和 RX 通道绑定在同一个 GPIO 上,进而模拟单总线的读写时序。在以前的版本中,你需要在驱动的配置中额外设置 ``io_loop_back`` 来实现这种“回环”功能,现在,这个配置已经被移除。不同的驱动只需要在配置中设置相同的 GPIO 编号就能实现这个功能。 不同的驱动对象可以共享同一个 GPIO 编号,联合起来可以实现更加复杂的功能。比如将 RMT 外设的 TX 通道和 RX 通道绑定在同一个 GPIO 上,进而模拟单总线的读写时序。在以前的版本中,你需要在驱动的配置中额外设置 ``io_loop_back`` 来实现这种“回环”功能,现在,这个配置已经被移除。不同的驱动只需要在配置中设置相同的 GPIO 编号就能实现这个功能。
@@ -89,12 +89,12 @@ I2C 从机在 v5.4 上已经被重新设计。在当前版本上,老的 I2C
主要的概念上和用法上的改变如下所示: 主要的概念上和用法上的改变如下所示:
主要概念更新 主要概念更新
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
- 老版本的 I2C 从机驱动是主动读写,这不符合 I2C 从机的一般用法。在新版的 I2C 从机中I2C 的读写通过主机驱动产生的事件以触发回调被动完成。 - 老版本的 I2C 从机驱动是主动读写,这不符合 I2C 从机的一般用法。在新版的 I2C 从机中I2C 的读写通过主机驱动产生的事件以触发回调被动完成。
主要用法更新 主要用法更新
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
- ``i2c_slave_receive`` 被移除, 在新驱动中使用回调接收数据。 - ``i2c_slave_receive`` 被移除, 在新驱动中使用回调接收数据。
- ``i2c_slave_transmit`` 已被 ``i2c_slave_write`` 取代。 - ``i2c_slave_transmit`` 已被 ``i2c_slave_write`` 取代。
@@ -104,7 +104,7 @@ I2C 从机在 v5.4 上已经被重新设计。在当前版本上,老的 I2C
同时I2C的主机驱动也有一些API用法上的改动 同时I2C的主机驱动也有一些API用法上的改动
主要用法更新 主要用法更新
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
当主机在I2C总线上检测到NACK以下的函数目前会返回 ``ESP_ERR_INVALID_RESPONSE``,而不是像之前一样返回 ``ESP_ERR_INVALID_STATE`` 当主机在I2C总线上检测到NACK以下的函数目前会返回 ``ESP_ERR_INVALID_RESPONSE``,而不是像之前一样返回 ``ESP_ERR_INVALID_STATE``
- ``i2c_master_transmit`` - ``i2c_master_transmit``
@@ -184,26 +184,47 @@ LCD
- :cpp:type:`esp_lcd_rgb_panel_event_callbacks_t` 中的 ``on_bounce_frame_finish`` 成员已被 :cpp:member:`esp_lcd_rgb_panel_event_callbacks_t::on_frame_buf_complete` 成员取代,用于指示一个完整的帧缓冲区已被发送给 LCD 控制器。 - :cpp:type:`esp_lcd_rgb_panel_event_callbacks_t` 中的 ``on_bounce_frame_finish`` 成员已被 :cpp:member:`esp_lcd_rgb_panel_event_callbacks_t::on_frame_buf_complete` 成员取代,用于指示一个完整的帧缓冲区已被发送给 LCD 控制器。
- I2C 接口的 LCD IO 层驱动有两套实现,分别基于新、旧 I2C Master 总线驱动。由于旧版的 I2C Master 驱动逐渐被弃用,遂 LCD 的 IO 层也移除对旧版的支持,只使用 ``driver/i2c_master.h`` 中提供的 API。 - I2C 接口的 LCD IO 层驱动有两套实现,分别基于新、旧 I2C Master 总线驱动。由于旧版的 I2C Master 驱动逐渐被弃用,遂 LCD 的 IO 层也移除对旧版的支持,只使用 ``driver/i2c_master.h`` 中提供的 API。
- :cpp:member:`esp_lcd_dpi_panel_config_t::pixel_format` 成员已经被废弃。建议仅使用 :cpp:member:`esp_lcd_dpi_panel_config_t::in_color_format` 来设定 MIPI DSI 驱动输入的像素数据格式。 - :cpp:member:`esp_lcd_dpi_panel_config_t::pixel_format` 成员已经被废弃。建议仅使用 :cpp:member:`esp_lcd_dpi_panel_config_t::in_color_format` 来设定 MIPI DSI 驱动输入的像素数据格式。
- NT35510 LCD 设备驱动已经从 ESP-IDF 中移动到外部仓库,并且托管在了 `ESP Component Registry <https://components.espressif.com/components/espressif/esp_lcd_nt35510/versions/1.0.0/readme>`_ 上。如果你的项目使用到了 NT35510 驱动,你可以通过运行 ``idf.py add-dependency "espressif/esp_lcd_nt35510"`` 将它添加到你的项目中。 - NT35510 LCD 设备驱动已经从 ESP-IDF 中移动到外部仓库,并且托管在了 `ESP Component Registry <https://components.espressif.com/components/espressif/esp_lcd_nt35510/versions/1.0.0/readme>`__ 上。如果你的项目使用到了 NT35510 驱动,你可以通过运行 ``idf.py add-dependency "espressif/esp_lcd_nt35510"`` 将它添加到你的项目中。
SPI SPI
--- ---
:ref:`CONFIG_SPI_MASTER_IN_IRAM` 选项在 menuconfig 中默认不可见,并且依赖于 :ref:`CONFIG_FREERTOS_IN_IRAM`。这样修改是为了防止位于 IRAM 中的 SPI 函数调用位于 flash 中的 FreeRTOS 函数时可能发生的崩溃。 - :ref:`CONFIG_SPI_MASTER_IN_IRAM` 选项在 menuconfig 中默认不可见,并且依赖于 :ref:`CONFIG_FREERTOS_IN_IRAM`。这样修改是为了防止位于 IRAM 中的 SPI 函数调用位于 flash 中的 FreeRTOS 函数时可能发生的崩溃。
- 按照下列步骤,启用 SPI 主机 IRAM 优化:
要启用 SPI 主机 IRAM 优化: 1. 在 menuconfig 中进入 ``Component config````FreeRTOS````Port``
2. 启用 ``Place FreeRTOS functions in IRAM`` (:ref:`CONFIG_FREERTOS_IN_IRAM`)。
3. 在 menuconfig 中进入 ``Component config````ESP-Driver:SPI Configurations``
4. 启用 ``Place transmitting functions of SPI master into IRAM`` (:ref:`CONFIG_SPI_MASTER_IN_IRAM`)。
1. 在 menuconfig 中进入 ``Component config````FreeRTOS````Port`` .. note::
2. 启用 ``Place FreeRTOS functions in IRAM`` (:ref:`CONFIG_FREERTOS_IN_IRAM`)
3. 在 menuconfig 中进入 ``Component config````ESP-Driver:SPI Configurations``
4. 启用 ``Place transmitting functions of SPI master into IRAM`` (:ref:`CONFIG_SPI_MASTER_IN_IRAM`)
请注意,启用 :ref:`CONFIG_FREERTOS_IN_IRAM` 会显著增加 IRAM 使用量。在优化 SPI 性能时,需进行权衡。 启用 :ref:`CONFIG_FREERTOS_IN_IRAM` 会显著增加 IRAM 使用量。在优化 SPI 性能时,需进行权衡。
- ESP32 和 ESP32S2 上已弃用的 HSPI 和 VSPI 相关 IOMUX 引脚宏已被移除。
PSRAM
-----
已弃用的头文件 ``esp_spiram.h`` 已被移除,请改用 ``esp_psram.h``
SPI flash 驱动
--------------
- 已弃用的 ``enum`` 类型 ``esp_flash_speed_t`` 已被移除。主 flash 速度由 :ref:`CONFIG_ESPTOOLPY_FLASHFREQ` 选项控制。
- 已弃用的头文件 ``esp_spi_flash.h`` 已被移除。请改用 ``spi_flash_mmap.h``
- 已弃用的 API ``spi_flash_dump_counters`` 已被移除。请改用 :cpp:func:`esp_flash_dump_counters`
- 已弃用的 API ``spi_flash_get_counters`` 已被移除。请改用 :cpp:func:`esp_flash_get_counters`
- 已弃用的 API ``spi_flash_reset_counters`` 已被移除。请改用 :cpp:func:`esp_flash_reset_counters`
.. note::
启用 :ref:`CONFIG_FREERTOS_IN_IRAM` 会显著增加 IRAM 使用量。在优化 SPI 性能时,需进行权衡。
Touch Element Touch Element
------------- -------------
``touch_element`` 组件已移至 [ESP Component Registry](https://components.espressif.com/components/espressif/touch_element/versions/1.0.0/readme) ``touch_element`` 组件已移至 `ESP Component Registry <https://components.espressif.com/components/espressif/touch_element/versions/1.0.0/readme>`__
您可以通过运行 ``idf.py add-dependency "espressif/touch_element"`` 将这个依赖添加到您的项目中。 您可以通过运行 ``idf.py add-dependency "espressif/touch_element"`` 将这个依赖添加到您的项目中。

View File

@@ -1,5 +1,5 @@
协议 协议
========= ====
:link_to_translation:`en:[English]` :link_to_translation:`en:[English]`
@@ -25,13 +25,13 @@ ESP-Modbus
* `GitHub 上的 ESP-Modbus 组件 <https://github.com/espressif/esp-modbus/tree/main>`__ * `GitHub 上的 ESP-Modbus 组件 <https://github.com/espressif/esp-modbus/tree/main>`__
文档 文档
~~~~~~~~~~~~~ ~~~~
* `ESP-MODBUS 稳定版文档 v2.x.x <https://docs.espressif.com/projects/esp-modbus/en/stable>`__ * `ESP-MODBUS 稳定版文档 v2.x.x <https://docs.espressif.com/projects/esp-modbus/en/stable>`__
* `旧版本 v1.x.x 文档 <https://docs.espressif.com/projects/esp-modbus/en/v1>`__ * `旧版本 v1.x.x 文档 <https://docs.espressif.com/projects/esp-modbus/en/v1>`__
应用示例 应用示例
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
自 ESP-IDF v6.0 版本起,已从 ESP-IDF 中移除已废弃的 ``esp-modbus v1`` 组件示例。 自 ESP-IDF v6.0 版本起,已从 ESP-IDF 中移除已废弃的 ``esp-modbus v1`` 组件示例。
@@ -39,17 +39,17 @@ ESP-Modbus
以下示例分别演示了串行和 TCP 端口的 ESP-Modbus 库在从站和主站实现中的应用。 以下示例分别演示了串行和 TCP 端口的 ESP-Modbus 库在从站和主站实现中的应用。
- `mb_serial_slave - 演示如何将 {IDF_TARGET_NAME} 用作 Modbus 串行从站设备,通过 esp-modbus 协议栈,使外部 Modbus 主机能够使用 Modbus 协议读写设备参数。 <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_slave>`__ - `mb_serial_slave <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_slave>`__ - 演示如何将 {IDF_TARGET_NAME} 用作 Modbus 串行从站设备,通过 esp-modbus 协议栈,使外部 Modbus 主机能够使用 Modbus 协议读写设备参数。
- `mb_serial_master - 演示如何在 {IDF_TARGET_NAME} 上使用 esp-modbus 协议栈端口作为 Modbus 串行主站设备,能够读写 Modbus 段中从站设备的值。 <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_master>`__ - `mb_serial_master <https://github.com/espressif/esp-modbus/tree/main/examples/serial/mb_serial_master>`__ - 演示如何在 {IDF_TARGET_NAME} 上使用 esp-modbus 协议栈端口作为 Modbus 串行主站设备,能够读写 Modbus 段中从站设备的值。
- `mb_tcp_slave - 演示 esp-modbus TCP 从站协议栈端口,允许外部 Modbus 主机通过 Modbus 协议读写设备参数。 <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_slave>`__ - `mb_tcp_slave <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_slave>`__ - 演示 esp-modbus TCP 从站协议栈端口,允许外部 Modbus 主机通过 Modbus 协议读写设备参数。
- `mb_tcp_master` - 演示如何在 {IDF_TARGET_NAME} 上使用 esp-modbus 协议栈端口作为 Modbus TCP 主站设备,能够读写 Modbus 网络中从站设备的值。 <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_master>`__ - `mb_tcp_master <https://github.com/espressif/esp-modbus/tree/main/examples/tcp/mb_tcp_master>`__ - 演示如何在 {IDF_TARGET_NAME} 上使用 esp-modbus 协议栈端口作为 Modbus TCP 主站设备,能够读写 Modbus 网络中从站设备的值。
有关详细信息,请参阅每个具体示例的 ``README.md`` 文档。 有关详细信息,请参阅每个具体示例的 ``README.md`` 文档。
讨论 讨论
~~~~~~~~~~~ ~~~~
* `v2 版本讨论 <https://github.com/espressif/esp-modbus/discussions>`__ * `v2 版本讨论 <https://github.com/espressif/esp-modbus/discussions>`__