From c5f1fda388abe26bef367b6bccbccfd83f30b420 Mon Sep 17 00:00:00 2001 From: mofeifei Date: Tue, 9 Jul 2024 19:30:08 +0800 Subject: [PATCH] docs: update cn trans for storage api reference index --- docs/en/api-reference/storage/index.rst | 18 ++++----- docs/zh_CN/api-reference/storage/index.rst | 45 +++++++++++++++++++++- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/docs/en/api-reference/storage/index.rst b/docs/en/api-reference/storage/index.rst index 3e31007594..19bf5b6b92 100644 --- a/docs/en/api-reference/storage/index.rst +++ b/docs/en/api-reference/storage/index.rst @@ -12,7 +12,7 @@ This section contains reference of the high-level storage APIs. They are based o - :doc:`FAT ` is a standard file system which can be used in SPI flash or on SD/MMC cards - :doc:`Wear Levelling ` library implements a flash translation layer (FTL) suitable for SPI NOR flash. It is used as a container for FAT partitions in flash. -Topics related to :doc:`Storage Security ` are described in separate section. +For information about storage security, please refer to :doc:`Storage Security `. .. note:: @@ -37,21 +37,21 @@ Topics related to :doc:`Storage Security ` are described in se wear-levelling storage-security.rst -.. list-table:: Code examples for this API section +.. list-table:: Code Examples for Storage API :widths: 25 75 :header-rows: 0 - * - **Link** + * - **Code Example** - **Description** - * - :doc:`FAT ` + * - :doc:`fatfs` - - * - :example:`` + * - :example:`wear_leveling ` - Demonstrates using FATFS over wear leveling on internal flash. * - :example:`ext_flash_fatfs ` - Demonstrates using FATFS over wear leveling on external flash. * - :example:`fatfsgen ` - Demonstrates the capabilities of Python-based tooling for FATFS images available on host computers. - * - :doc:`Non-Volatile Storage library (NVS) ` + * - :doc:`nvs_flash` - * - :example:`nvs_rw_blob ` - Shows the use of the C-style API to read and write blob data types in NVS flash. @@ -61,19 +61,19 @@ Topics related to :doc:`Storage Security ` are described in se - Shows the use of the C++-style API to read and write integer data types in NVS flash. * - :example:`nvsgen ` - Demonstrates how to use the Python-based NVS image generation tool to create an NVS partition image from the contents of a CSV file. - * - :doc:`SPIFFS ` + * - :doc:`spiffs` - * - :example:`spiffs ` - Shows the use of the SPIFFS API to initialize the filesystem and work with files using POSIX functions. * - :example:`spiffsgen ` - Demonstrates the capabilities of Python-based tooling for SPIFFS images available on host computers. - * - :doc:`Partitions API ` + * - :doc:`partition` - * - :example:`partition_api ` - Provides an overview of API functions to look up particular partitions, perform basic I/O operations, and use partitions via CPU memory mapping. * - :example:`parttool ` - Demonstrates the capabilities of Python-based tooling for partition images available on host computers. - * - :doc:`Virtual File System (VFS) ` + * - :doc:`vfs` - * - :example:`littlefs ` - Shows the use of the LittleFS component to initialize the filesystem and work with a file using POSIX functions. diff --git a/docs/zh_CN/api-reference/storage/index.rst b/docs/zh_CN/api-reference/storage/index.rst index 04077378ac..0687d98c05 100644 --- a/docs/zh_CN/api-reference/storage/index.rst +++ b/docs/zh_CN/api-reference/storage/index.rst @@ -12,6 +12,8 @@ - :doc:`FAT ` 是一个可用于 SPI flash 或者 SD/MMC 存储卡的标准文件系统。 - :doc:`磨损均衡 ` 库实现了一个适用于 SPI NOR flash 的 flash 翻译层 (FTL),用于 flash 中 FAT 分区的容器。 +与存储安全相关的信息,请参考 :doc:` 存储安全 `。 + .. note:: 建议使用高层次的 API(``esp_partition`` 或者文件系统)而非低层次驱动 API 去访问 SPI NOR flash。 @@ -35,4 +37,45 @@ wear-levelling storage-security.rst -此部分 API 代码示例存放在 ESP-IDF 示例项目的 :example:`storage` 目录下。 +.. list-table:: 存储 API 相关例程 + :widths: 25 75 + :header-rows: 0 + + * - **例程** + - **描述** + * - :doc:`fatfs` + - + * - :example:`wear_leveling ` + - 演示了如何在内部 flash 上使用 FATFS 磨损均衡。 + * - :example:`ext_flash_fatfs ` + - 演示了如何在外部 flash 上使用 FATFS 磨损均衡。 + * - :example:`fatfsgen ` + - 演示了在主机计算机上使用 Python 工具生成 FATFS 镜像的功能。 + * - :doc:`nvs_flash` + - + * - :example:`nvs_rw_blob ` + - 演示了如何在 NVS flash 中使用 C 语言 API 读写 blob 数据类型。 + * - :example:`nvs_rw_value ` + - 演示了如何在 NVS flash 中使用 C 语言 API 读写整数数据类型。 + * - :example:`nvs_rw_value_cxx ` + - 演示了如何在 NVS flash 中使用 C++ 语言 API 读写整数数据类型。 + * - :example:`nvsgen ` + - 演示了如何使用基于 Python 的 NVS 镜像生成工具,根据 CSV 文件内容创建 NVS 分区镜像。 + * - :doc:`spiffs` + - + * - :example:`spiffs ` + - 演示了如何使用 SPIFFS API 初始化文件系统,并使用 POSIX 函数处理文件。 + * - :example:`spiffsgen ` + - 演示了在主机计算机上使用 Python 工具生成 SPIFFS 镜像的功能。 + * - :doc:`partition` + - + * - :example:`partition_api ` + - 介绍了用于查找特定分区、执行基本 I/O 操作以及通过 CPU 内存映射使用分区的 API 函数。 + * - :example:`parttool ` + - 演示了在主机计算机上使用 Python 工具生成分区镜像的功能。 + * - :doc:`vfs` + - + * - :example:`littlefs ` + - 演示了如何使用 LittleFS 组件初始化文件系统,并使用 POSIX 函数处理文件。 + * - :example:`semihost_vfs ` + - 演示了如何使用 VFS API,利用 POSIX 函数使 ESP 设备访问通过 JTAG 连接的主机上的文件。