Skip to content

Commit

Permalink
[docs] Add file and FAL mode configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
armink committed Oct 6, 2021
1 parent 07db5a2 commit 353f261
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions docs/zh-cn/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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。目前支持
Expand Down

0 comments on commit 353f261

Please sign in to comment.