[docs] Add file and FAL mode configuration.

This commit is contained in:
armink 2021-10-06 09:27:41 +08:00
parent 07db5a2242
commit 353f261008
2 changed files with 28 additions and 0 deletions

View File

@ -14,6 +14,20 @@ Enable KV automatic upgrade function. After this function is enabled, `fdb_kvdb.
Enable TSDB feature
## FDB_USING_FAL_MODE
Enable FAL mode, partition in FAL is used to store the database. In this mode, FlashDB directly operates Flash, so performance is better.
## FDB_USING_FILE_POSIX_MODE
Using POSIX file mode, you need to provide an open/read/write/close related file access interface.
## FDB_USING_FILE_LIBC_MODE
Using the file mode of the C standard library, you need to provide a fopen/fread/fwrte/fclose related file access interface.
> FDB_USING_FILE_LIBC_MODE and FDB_USING_FILE_POSIX_MODE mode can ONLY be one. Compared to FAL mode, the storage location, size and quantity of the database in the file mode are not limited.
## FDB_WRITE_GRAN
Flash write granularity, the unit is bit. Currently supports

View File

@ -14,6 +14,20 @@ FlashDB 的使用时,可以通过 fdb_cfg.h 对其进行功能配置,该文
使能 TSDB 功能
## FDB_USING_FAL_MODE
使能 FAL 模式FAL 里的分区用于存储数据库。该模式下FlashDB 直接操作 Flash所以性能较好
## FDB_USING_FILE_POSIX_MODE
使用 POSIX 的文件模式,需要系统提供 open/read/write/close 相关文件访问接口。
## FDB_USING_FILE_LIBC_MODE
使用 C 标准库的文件模式,需要系统提供 fopen/fread/fwrite/fclose 相关文件访问接口。
> FDB_USING_FILE_LIBC_MODE 与 FDB_USING_FILE_POSIX_MODE 模式只能二选一。相比 FAL 模式,文件模式下数据库的存储位置、大小及数量没有限制。
## FDB_WRITE_GRAN
Flash 写粒度,单位为 bit。目前支持