kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'docs/update_CN_trans_get_started' into 'master'
docs:update CN transalation for get-started section and sdmmc Closes DOC-2383 and DOC-2380 See merge request espressif/esp-idf!16369pull/8162/head
commit
39f3e082e1
|
@ -62,7 +62,7 @@ An example which combines the SDMMC driver with the FATFS library is provided in
|
||||||
Using API with SDIO cards
|
Using API with SDIO cards
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Initialization and the probing process is the same as with SD memory cards. The only difference is in data transfer commands in SDIO mode.
|
Initialization and the probing process are the same as with SD memory cards. The only difference is in data transfer commands in SDIO mode.
|
||||||
|
|
||||||
During the card initialization and probing, performed with :cpp:func:`sdmmc_card_init`, the driver only configures the following registers of the IO card:
|
During the card initialization and probing, performed with :cpp:func:`sdmmc_card_init`, the driver only configures the following registers of the IO card:
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ Unzip the zip file to ``C:\Program Files`` (or some other location). The zip fil
|
||||||
|
|
||||||
Next, the ``bin`` subdirectory of this directory must be :ref:`added to your Path <add-directory-windows-path>`. For example, the directory to add may be ``C:\Program Files\{IDF_TARGET_TOOLCHAIN_PREFIX}\bin``.
|
Next, the ``bin`` subdirectory of this directory must be :ref:`added to your Path <add-directory-windows-path>`. For example, the directory to add may be ``C:\Program Files\{IDF_TARGET_TOOLCHAIN_PREFIX}\bin``.
|
||||||
|
|
||||||
|
|
||||||
.. _add-directory-windows-path:
|
.. _add-directory-windows-path:
|
||||||
|
|
||||||
Adding Directory to Path
|
Adding Directory to Path
|
||||||
|
|
|
@ -12,11 +12,11 @@ ESP-IDF requires some prerequisite tools to be installed so you can build firmwa
|
||||||
For this Getting Started we're going to use the Command Prompt, but after ESP-IDF is installed you can use :doc:`Eclipse <eclipse-setup>` or another graphical IDE with CMake support instead.
|
For this Getting Started we're going to use the Command Prompt, but after ESP-IDF is installed you can use :doc:`Eclipse <eclipse-setup>` or another graphical IDE with CMake support instead.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Limitations:
|
Limitations:
|
||||||
- The installation path of ESP-IDF and ESP-IDF Tools must not be longer than 90 characters. Too long installation paths might result in a failed build.
|
- The installation path of ESP-IDF and ESP-IDF Tools must not be longer than 90 characters. Too long installation paths might result in a failed build.
|
||||||
- The installation path of Python or ESP-IDF must not contain white spaces or parentheses.
|
- The installation path of Python or ESP-IDF must not contain white spaces or parentheses.
|
||||||
- The installation path of Python or ESP-IDF should not contain special characters (non-ASCII) unless the operating system is configured with "Unicode UTF-8" support.
|
- The installation path of Python or ESP-IDF should not contain special characters (non-ASCII) unless the operating system is configured with "Unicode UTF-8" support.
|
||||||
|
|
||||||
System Administrator can enable the support via Control Panel - Change date, time, or number formats - Administrative tab - Change system locale - check the option "Beta: Use Unicode UTF-8 for worldwide language support" - Ok and reboot the computer.
|
System Administrator can enable the support via Control Panel - Change date, time, or number formats - Administrative tab - Change system locale - check the option "Beta: Use Unicode UTF-8 for worldwide language support" - Ok and reboot the computer.
|
||||||
|
|
||||||
.. _get-started-windows-tools-installer:
|
.. _get-started-windows-tools-installer:
|
||||||
|
|
|
@ -39,9 +39,9 @@ ESP-IDF :example:`storage/sd_card` 目录下提供了 SDMMC 驱动与 FatFs 库
|
||||||
协议层 API
|
协议层 API
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
协议层具备 :cpp:class:`sdmmc_host_t` 结构体,此结构体描述了 SD/MMC 主机驱动,列出了其功能,并提供指向驱动程序函数的指针。协议层将卡信息储存于 :cpp:class:`sdmmc_card_t` 结构体中。向 SD/MMC 主机发送命令时,协议层调用时需要一个 :cpp:class:`sdmmc_command_t` 结构体来描述命令、参数、预期返回值和需传输的数据(如有)。
|
协议层具备 :cpp:class:`sdmmc_host_t` 结构体,此结构体描述了 SD/MMC 主机驱动,列出了其功能,并提供指向驱动程序函数的指针。协议层将卡信息储存于 :cpp:class:`sdmmc_card_t` 结构体中。向 SD/MMC 主机发送命令时,协议层使用 :cpp:class:`sdmmc_command_t` 结构体来描述命令、参数、预期返回值和需传输的数据(如有)。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
用于 SD 存储卡的 API
|
用于 SD 存储卡的 API
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ ESP-IDF :example:`storage/sd_card` 目录下提供了 SDMMC 驱动与 FatFs 库
|
||||||
|
|
||||||
如需初始化 eMMC 内存并执行读/写操作,请参照上一章节 SD 卡操作步骤。
|
如需初始化 eMMC 内存并执行读/写操作,请参照上一章节 SD 卡操作步骤。
|
||||||
|
|
||||||
|
|
||||||
用于 SDIO 卡的 API
|
用于 SDIO 卡的 API
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -68,26 +68,26 @@ ESP-IDF :example:`storage/sd_card` 目录下提供了 SDMMC 驱动与 FatFs 库
|
||||||
|
|
||||||
1. I/O 中止 (0x06) 寄存器:在该寄存器中设置 RES 位可重置卡的 IO 部分;
|
1. I/O 中止 (0x06) 寄存器:在该寄存器中设置 RES 位可重置卡的 IO 部分;
|
||||||
2. 总线接口控制 (0x07) 寄存器:如果主机和插槽配置中启用 4 线模式,则驱动程序会尝试在该寄存器中设置总线宽度字段。如果字段设置成功,则从机支持 4 线模式,主机也切换至 4 线模式;
|
2. 总线接口控制 (0x07) 寄存器:如果主机和插槽配置中启用 4 线模式,则驱动程序会尝试在该寄存器中设置总线宽度字段。如果字段设置成功,则从机支持 4 线模式,主机也切换至 4 线模式;
|
||||||
3. 高速(0x13)寄存器:如果主机配置中启用高速模式,则会在该寄存器中设置 SHS 位。
|
3. 高速(0x13)寄存器:如果主机配置中启用高速模式,则该寄存器的 SHS 位会被设置。
|
||||||
|
|
||||||
注意,驱动程序不会在 (1) I/O 使能寄存器和 Int 使能寄存器,及 (2) I/O 块大小中,设置任何位。应用程序可通过调用 :cpp:func:`sdmmc_io_write_byte` 来设置相关位。
|
注意,驱动程序不会在 (1) I/O 使能寄存器和 Int 使能寄存器,及 (2) I/O 块大小中,设置任何位。应用程序可通过调用 :cpp:func:`sdmmc_io_write_byte` 来设置相关位。
|
||||||
|
|
||||||
如需设置卡配置或传输数据,请根据您的具体情况选择下表中的函数:
|
如需卡配置或传输数据,请根据您的具体情况选择下表中的函数:
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
:widths: 55 25 20
|
:widths: 55 25 20
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
|
|
||||||
* - Action
|
* - 操作
|
||||||
- Read Function
|
- 函数读取
|
||||||
- Write Function
|
- 函数写入
|
||||||
* - Read and write a single byte using IO_RW_DIRECT (CMD52)
|
* - 使用 IO_RW_DIRECT (CMD52) 读写单个字节。
|
||||||
- :cpp:func:`sdmmc_io_read_byte`
|
- :cpp:func:`sdmmc_io_read_byte`
|
||||||
- :cpp:func:`sdmmc_io_write_byte`
|
- :cpp:func:`sdmmc_io_write_byte`
|
||||||
* - Read and write multiple bytes using IO_RW_EXTENDED (CMD53) in byte mode
|
* - 使用 IO_RW_EXTENDED (CMD53) 的字节模式读写多个字节。
|
||||||
- :cpp:func:`sdmmc_io_read_bytes`
|
- :cpp:func:`sdmmc_io_read_bytes`
|
||||||
- :cpp:func:`sdmmc_io_write_bytes`
|
- :cpp:func:`sdmmc_io_write_bytes`
|
||||||
* - Read and write blocks of data using IO_RW_EXTENDED (CMD53) in block mode
|
* - 块模式下,使用 IO_RW_EXTENDED (CMD53) 读写数据块。
|
||||||
- :cpp:func:`sdmmc_io_read_blocks`
|
- :cpp:func:`sdmmc_io_read_blocks`
|
||||||
- :cpp:func:`sdmmc_io_write_blocks`
|
- :cpp:func:`sdmmc_io_write_blocks`
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ ESP-IDF :example:`storage/sd_card` 目录下提供了 SDMMC 驱动与 FatFs 库
|
||||||
|
|
||||||
.. only:: esp32
|
.. only:: esp32
|
||||||
|
|
||||||
如果您需要与 ESP32 的 SDIO 从设备通信,请使用 ESSL 组件(ESP 串行从设备链接)。请参阅 :doc:`/api-reference/protocols/esp_serial_slave_link` and example :example:`peripherals/sdio/host`
|
如果您需要与 ESP32 的 SDIO 从设备通信,请使用 ESSL 组件(ESP 串行从设备链接)。请参阅 :doc:`/api-reference/protocols/esp_serial_slave_link` 和 :example:`peripherals/sdio/host`。
|
||||||
|
|
||||||
复合卡(存储 + IO)
|
复合卡(存储 + IO)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -775,6 +775,12 @@ Windows 操作系统
|
||||||
|
|
||||||
``idf.py -p PORT flash monitor``
|
``idf.py -p PORT flash monitor``
|
||||||
|
|
||||||
|
.. only:: esp32s3
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
如果带有八线 flash 的开发板在二级引导加载程序之前复位,请参考 :ref:`八线 flash 错误处理 <flash-psram-error>`。
|
||||||
|
|
||||||
此外,
|
此外,
|
||||||
|
|
||||||
- 请前往 :doc:`IDF 监视器 <../api-guides/tools/idf-monitor>`,了解更多使用 IDF 监视器的快捷键和其他详情。
|
- 请前往 :doc:`IDF 监视器 <../api-guides/tools/idf-monitor>`,了解更多使用 IDF 监视器的快捷键和其他详情。
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
较早版本 ESP-IDF 使用了 **MSYS2 bash 终端命令行**。目前,基于 CMake 的编译系统可使用常见的 **Windows 命令窗口**,即本指南中使用的终端。
|
较早版本 ESP-IDF 使用了 **MSYS2 bash 终端命令行**。目前,基于 CMake 的编译系统可使用常见的 **Windows 命令窗口**,即本指南中使用的终端。
|
||||||
|
|
||||||
请注意,如果您使用基于 bash 的终端或 PowerShell 终端,一些命令语法将与下面描述有所不同。
|
请注意,如果您使用 PowerShell 终端,一些命令语法将与下面描述有所不同。
|
||||||
|
|
||||||
打开命令提示符,运行以下命令:
|
打开命令提示符,运行以下命令:
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ Windows 平台工具链的标准设置
|
||||||
|
|
||||||
:link_to_translation:`en:[English]`
|
:link_to_translation:`en:[English]`
|
||||||
|
|
||||||
|
|
||||||
概述
|
概述
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue