diff --git a/docs/configuration.md b/docs/configuration.md index fc30fc1..387c80a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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 diff --git a/docs/zh-cn/configuration.md b/docs/zh-cn/configuration.md index 169eb22..8dd6ced 100644 --- a/docs/zh-cn/configuration.md +++ b/docs/zh-cn/configuration.md @@ -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。目前支持