mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
edc43201db
This should not change any generated binary
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
/**
|
|
* @defgroup pkg_flashdb FlashDB: Database for Flash
|
|
* @ingroup pkg
|
|
* @brief An ultra-lightweight embedded database
|
|
* @see http://armink.gitee.io/flashdb/
|
|
*
|
|
* This package provides a Key-Value database and a Time series database
|
|
* that can be used with a MTD or a file system backend.
|
|
*
|
|
* It is recommended to use the use the MTD backend for performance reasons,
|
|
* but if you have a filesystem anyway or want to store the database as a file
|
|
* there is also a VFS backend that can be used instead.
|
|
*
|
|
* MTD Backend
|
|
* ===========
|
|
* To enable the MTD backend, select the `flashdb_mtd` module.
|
|
*
|
|
* FlashDB can only use a single MTD device. To assign a MTD device for FlashDB
|
|
* to use, call
|
|
*
|
|
* ```C
|
|
* fdb_mtd_init(MTD_0);
|
|
* ```
|
|
*
|
|
* FlashDB allows for multiple partitions on the device. They have to configured
|
|
* at compile time:
|
|
*
|
|
* ```
|
|
* CFLAGS += -DFAL_PART0_LABEL=\"part0\"
|
|
* CFLAGS += -DFAL_PART0_LENGTH=8*1024
|
|
*
|
|
* CFLAGS += -DFAL_PART1_LABEL=\"part1\"
|
|
* CFLAGS += -DFAL_PART1_LENGTH=4*1024
|
|
* ```
|
|
*
|
|
* The partition names have to be used in `fdb_kvdb_init()` / `fdb_tsdb_init()`.
|
|
*
|
|
* VFS Backend
|
|
* ===========
|
|
* To enable the VFS Backend, select the `flashdb_vfs` module.
|
|
*
|
|
* Here instead of partitions, FlashDB uses directories to store the data.
|
|
* The directory names are used instead of the partition names in `fdb_kvdb_init()` /
|
|
* `fdb_tsdb_init()` and you have to enable file mode by calling
|
|
*
|
|
* ```C
|
|
* bool file_mode = true;
|
|
* fdb_kvdb_control(&kvdb, FDB_KVDB_CTRL_SET_FILE_MODE, &file_mode);
|
|
* ```
|
|
*
|
|
* for the Key-Value database and
|
|
*
|
|
* ```C
|
|
* bool file_mode = true;
|
|
* fdb_tsdb_control(&tsdb, FDB_TSDB_CTRL_SET_FILE_MODE, &file_mode);
|
|
* ```
|
|
*
|
|
* for the time-series database.
|
|
*
|
|
* Key-Value database
|
|
* ==================
|
|
* To enable the Key-Value database, select the `flashdb_kvdb` module.
|
|
*
|
|
* For use of the FlashDB API, refer to the [FlashDB documentation](http://armink.gitee.io/flashdb/#/sample-kvdb-basic).
|
|
*
|
|
* Time series database
|
|
* ====================
|
|
* To enable the Key-Value database, select the `flashdb_tsdb` module.
|
|
*
|
|
* For use of the FlashDB API, refer to the [FlashDB documentation](http://armink.gitee.io/flashdb/#/sample-tsdb-basic).
|
|
*/
|