mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(nvs_flash): Added support for storing flash and double types
- added backward compatibility test for unknown NVS entry types - axtended documentation with the support of double and float
This commit is contained in:
@@ -35,6 +35,7 @@ NVS 的操作对象为键值对,其中键是 ASCII 字符串,当前支持的
|
||||
- 整数型:``uint8_t``、``int8_t``、``uint16_t``、``int16_t``、``uint32_t``、``int32_t``、``uint64_t`` 和 ``int64_t``;
|
||||
- 以 0 结尾的字符串;
|
||||
- 可变长度的二进制数据 (BLOB)
|
||||
- 浮点类型:``float`` 和 ``double``
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -48,7 +49,9 @@ NVS 的操作对象为键值对,其中键是 ASCII 字符串,当前支持的
|
||||
|
||||
在设置新的键值对或更新现有键值对之前,NVS 页中必须有可用的空闲条目。对于整数类型,至少需要有一个空闲条目。对于字符串值,至少需要一个能够将整个字符串连续存储在空闲条目中的页面。对于 blob 值,空闲条目中需要有足够空间容纳新数据的大小。
|
||||
|
||||
其他数据类型,例如 ``float`` 和 ``double``,可能会在以后添加。
|
||||
.. note::
|
||||
|
||||
无论特定 SoC 上是否存在 FPU,均支持浮点类型 ``float`` 和 ``double``。
|
||||
|
||||
键必须唯一。为现有的键写入新值时,会将旧的值及数据类型更新为写入操作指定的值和数据类型。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user