Skip to content

Commit b077cae

Browse files
committed
refactor(examples/storage): update document links
1 parent f1ff9e1 commit b077cae

File tree

14 files changed

+42
-66
lines changed

14 files changed

+42
-66
lines changed

docs/en/api-guides/bootloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,6 @@ The current bootloader implementation allows a project to extend it or modify it
186186

187187
In the bootloader space, you cannot use the drivers and functions from other components unless they explicitly support run in bootloader. If necessary, then the required functionality should be placed in the project's `bootloader_components` directory (note that this will increase its size). Examples of components that can be used in the bootloader are:
188188

189-
* :example:`storage/nvs_bootloader`
189+
* :example:`storage/nvs/nvs_bootloader`
190190

191191
If the bootloader grows too large then it can collide with the partition table, which is flashed at offset 0x8000 by default. Increase the :ref:`partition table offset <CONFIG_PARTITION_TABLE_OFFSET>` value to place the partition table later in the flash. This increases the space available for the bootloader.

docs/en/api-guides/file-system-considerations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ Points to keep in mind when developing NVS related code:
181181

182182
**Examples:**
183183

184-
- :example:`storage/nvs_rw_value` demonstrates how to use NVS to write and read a single integer value.
185-
- :example:`storage/nvs_rw_blob` demonstrates how to use NVS to write and read a blob.
184+
- :example:`storage/nvs/nvs_rw_value` demonstrates how to use NVS to write and read a single integer value.
185+
- :example:`storage/nvs/nvs_rw_blob` demonstrates how to use NVS to write and read a blob.
186186
- :example:`security/nvs_encryption_hmac` demonstrates NVS encryption using the HMAC peripheral, where the encryption keys are derived from the HMAC key burnt in eFuse.
187187
- :example:`security/flash_encryption` demonstrates the flash encryption workflow including NVS partition creation and usage.
188188

docs/en/api-reference/storage/index.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ Examples
4747

4848
* - **Code Example**
4949
- **Description**
50-
* - :example:`nvs_rw_blob <storage/nvs_rw_blob>`
50+
* - :example:`nvs_rw_blob <storage/nvs/nvs_rw_blob>`
5151
- Shows the use of the C-style API to read and write blob data types in NVS flash.
52-
* - :example:`nvs_rw_value <storage/nvs_rw_value>`
52+
* - :example:`nvs_rw_value <storage/nvs/nvs_rw_value>`
5353
- Shows the use of the C-style API to read and write integer data types in NVS flash.
54-
* - :example:`nvs_rw_value_cxx <storage/nvs_rw_value_cxx>`
54+
* - :example:`nvs_rw_value_cxx <storage/nvs/nvs_rw_value_cxx>`
5555
- Shows the use of the C++-style API to read and write integer data types in NVS flash.
56-
* - :example:`nvs_bootloader <storage/nvs_bootloader>`
56+
* - :example:`nvs_bootloader <storage/nvs/nvs_bootloader>`
5757
- Shows the use of the API available to the bootloader code to read NVS data.
58-
* - :example:`nvsgen <storage/nvsgen>`
58+
* - :example:`nvsgen <storage/nvs/nvsgen>`
5959
- Demonstrates how to use the Python-based NVS image generation tool to create an NVS partition image from the contents of a CSV file.
60+
* - :example:`nvs_console <storage/nvs/nvs_console>`
61+
- Demonstrates how to use NVS through an interactive console interface.
6062

6163
.. list-table:: Common Filesystem API
6264
:widths: 25 75

docs/en/api-reference/storage/nvs_bootloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Applications are expected to follow the steps below in order to enable decryptio
3737
Application Example
3838
-------------------
3939

40-
You can find code examples in :example:`storage/nvs_bootloader` (in the :example:`storage` directory of ESP-IDF examples).
40+
You can find code examples in :example:`storage/nvs/nvs_bootloader` (in the :example:`storage/nvs` directory of ESP-IDF examples).
4141

4242
This section demonstrates how to prepare data in the input-output structure for various data types, namespaces, and keys. It includes an example of reading string data from NVS.
4343

docs/en/api-reference/storage/nvs_flash.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ If ``FLASH_IN_PROJECT`` is not specified, the image will still be generated, but
154154
Application Example
155155
-------------------
156156

157-
You can find code examples in the :example:`storage` directory of ESP-IDF examples:
157+
You can find code examples in the :example:`storage/nvs` directory of ESP-IDF examples:
158158

159-
:example:`storage/nvs_rw_value`
159+
:example:`storage/nvs/nvs_rw_value`
160160

161161
Demonstrates how to read a single integer value from, and write it to NVS.
162162

163163
The value checked in this example holds the number of the {IDF_TARGET_NAME} module restarts. The value's function as a counter is only possible due to its storing in NVS.
164164

165165
The example also shows how to check if a read/write operation was successful, or if a certain value has not been initialized in NVS. The diagnostic procedure is provided in plain text to help you track the program flow and capture any issues on the way.
166166

167-
:example:`storage/nvs_rw_blob`
167+
:example:`storage/nvs/nvs_rw_blob`
168168

169169
Demonstrates how to read a single integer value and a blob (binary large object), and write them to NVS to preserve this value between {IDF_TARGET_NAME} module restarts.
170170

@@ -173,9 +173,9 @@ You can find code examples in the :example:`storage` directory of ESP-IDF exampl
173173

174174
The example also shows how to implement the diagnostic procedure to check if the read/write operation was successful.
175175

176-
:example:`storage/nvs_rw_value_cxx`
176+
:example:`storage/nvs/nvs_rw_value_cxx`
177177

178-
This example does exactly the same as :example:`storage/nvs_rw_value`, except that it uses the C++ NVS handle class.
178+
This example does exactly the same as :example:`storage/nvs/nvs_rw_value`, except that it uses the C++ NVS handle class.
179179

180180
Internals
181181
---------

docs/zh_CN/api-guides/bootloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,6 @@ ESP-IDF 二级引导加载程序位于 flash 的 {IDF_TARGET_CONFIG_BOOTLOADER_O
186186

187187
在引导加载程序的代码中,不能使用其他组件提供的驱动和函数,除非某个驱动或函数明确声明支持在引导加载程序中运行。如果确实需要,请将所需功能放在项目的 `bootloader_components` 目录中(注意,这会增加引导加载程序的大小)。以下是可以在引导加载程序中使用的组件示例:
188188

189-
* :example:`storage/nvs_bootloader`
189+
* :example:`storage/nvs/nvs_bootloader`
190190

191191
如果引导加载程序过大,则可能与内存中的分区表重叠,分区表默认烧录在偏移量 0x8000 处。增加 :ref:`分区表偏移量 <CONFIG_PARTITION_TABLE_OFFSET>` ,将分区表放在 flash 中靠后的区域,这样可以增加引导加载程序的可用空间。

docs/zh_CN/api-guides/file-system-considerations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ NVS 具有如下特性:
181181

182182
**示例:**
183183

184-
- :example:`storage/nvs_rw_value` 演示了如何写入和读取一个整数值。
185-
- :example:`storage/nvs_rw_blob` 演示如何写入和读取一个 blob。
184+
- :example:`storage/nvs/nvs_rw_value` 演示了如何写入和读取一个整数值。
185+
- :example:`storage/nvs/nvs_rw_blob` 演示如何写入和读取一个 blob。
186186
- :example:`security/nvs_encryption_hmac` 演示了如何用 HMAC 外设进行 NVS 加密,并通过 efuse 中的 HMAC 密钥生成加密密钥。
187187
- :example:`security/flash_encryption` 演示了如何进行 flash 加密,包括创建和使用 NVS 分区。
188188

docs/zh_CN/api-reference/storage/index.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@
4747

4848
* - **例程**
4949
- **描述**
50-
* - :example:`nvs_rw_blob <storage/nvs_rw_blob>`
50+
* - :example:`nvs_rw_blob <storage/nvs/nvs_rw_blob>`
5151
- 演示了如何在 NVS flash 中使用 C 语言 API 读写 blob 数据类型。
52-
* - :example:`nvs_rw_value <storage/nvs_rw_value>`
52+
* - :example:`nvs_rw_value <storage/nvs/nvs_rw_value>`
5353
- 演示了如何在 NVS flash 中使用 C 语言 API 读写整数数据类型。
54-
* - :example:`nvs_rw_value <storage/nvs_rw_value>`
54+
* - :example:`nvs_rw_value <storage/nvs/nvs_rw_value_cxx>`
5555
- 演示了如何在 NVS flash 中使用 C++ 语言 API 读写整数数据类型。
56-
* - :example:`nvs_bootloader <storage/nvs_bootloader>`
56+
* - :example:`nvs_bootloader <storage/nvs/nvs_bootloader>`
5757
- 演示了如何使用引导加载程序代码中可用的 API 来读取 NVS 数据。
58-
* - :example:`nvsgen <storage/nvsgen>`
58+
* - :example:`nvsgen <storage/nvs/nvsgen>`
5959
- 演示了如何使用基于 Python 的 NVS 镜像生成工具,根据 CSV 文件内容创建 NVS 分区镜像。
60+
* - :example:`nvs_console <storage/nvs/nvs_console>`
61+
- 演示了如何通过交互式控制台界面使用 NVS。
6062

6163
.. list-table:: 常用文件系统 API
6264
:widths: 25 75

docs/zh_CN/api-reference/storage/nvs_bootloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
应用示例
3838
-----------
3939

40-
代码示例请参阅 ESP-IDF 示例 :example:`storage` 目录下的 :example:`storage/nvs_bootloader`。
40+
代码示例请参阅 ESP-IDF 示例 :example:`storage/nvs` 目录下的 :example:`storage/nvs/nvs_bootloader`。
4141

4242
本节演示了如何在输入/输出结构中准备数据,以支持不同的数据类型、命名空间和键。此外,还包含从 NVS 读取字符串数据的示例。
4343

docs/zh_CN/api-reference/storage/nvs_flash.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ NVS 分区生成程序帮助生成 NVS 分区二进制文件,可使用烧录
154154
应用示例
155155
-------------------
156156

157-
ESP-IDF :example:`storage` 目录下提供了数个代码示例:
157+
ESP-IDF :example:`storage/nvs` 目录下提供了数个代码示例:
158158

159-
:example:`storage/nvs_rw_value`
159+
:example:`storage/nvs/nvs_rw_value`
160160

161161
演示如何读取及写入 NVS 单个整数值。
162162

163163
此示例中的值表示 {IDF_TARGET_NAME} 模组重启次数。NVS 中数据不会因为模组重启而丢失,因此只有将这一值存储于 NVS 中,才能起到重启次数计数器的作用。
164164

165165
该示例也演示了如何检测读取/写入操作是否成功,以及某个特定值是否在 NVS 中尚未初始化。诊断程序以纯文本形式提供,有助于追踪程序流程,及时发现问题。
166166

167-
:example:`storage/nvs_rw_blob`
167+
:example:`storage/nvs/nvs_rw_blob`
168168

169169
演示如何读取及写入 NVS 单个整数值和 BLOB(二进制大对象),并在 NVS 中存储这一数值,即便 {IDF_TARGET_NAME} 模组重启也不会消失。
170170

@@ -173,9 +173,9 @@ ESP-IDF :example:`storage` 目录下提供了数个代码示例:
173173

174174
该示例也演示了如何执行诊断程序以检测读取/写入操作是否成功。
175175

176-
:example:`storage/nvs_rw_value_cxx`
176+
:example:`storage/nvs/nvs_rw_value_cxx`
177177

178-
这个例子与 :example:`storage/nvs_rw_value` 完全一样,只是使用了 C++ 的 NVS 句柄类。
178+
这个例子与 :example:`storage/nvs/nvs_rw_value` 完全一样,只是使用了 C++ 的 NVS 句柄类。
179179

180180
内部实现
181181
---------

0 commit comments

Comments
 (0)