fdb_cfg.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2020, Armink, <armink.ztl@gmail.com>
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief configuration file
  9. */
  10. #ifndef _FDB_CFG_H_
  11. #define _FDB_CFG_H_
  12. /* using KVDB feature */
  13. #define FDB_USING_KVDB
  14. #ifdef FDB_USING_KVDB
  15. /* Auto update KV to latest default when current KVDB version number is changed. @see fdb_kvdb.ver_num */
  16. /* #define FDB_KV_AUTO_UPDATE */
  17. #endif
  18. /* using TSDB (Time series database) feature */
  19. #define FDB_USING_TSDB
  20. /* Using FAL storage mode */
  21. #define FDB_USING_FAL_MODE
  22. #ifdef FDB_USING_FAL_MODE
  23. /* the flash write granularity, unit: bit
  24. * only support 1(nor flash)/ 8(stm32f2/f4)/ 32(stm32f1) */
  25. #define FDB_WRITE_GRAN 32 /* @note you must define it for a value */
  26. #endif
  27. /* Using file storage mode by LIBC file API, like fopen/fread/fwrte/fclose */
  28. /* #define FDB_USING_FILE_LIBC_MODE */
  29. /* Using file storage mode by POSIX file API, like open/read/write/close */
  30. /* #define FDB_USING_FILE_POSIX_MODE */
  31. /* MCU Endian Configuration, default is Little Endian Order. */
  32. /* #define FDB_BIG_ENDIAN */
  33. /* log print macro. default EF_PRINT macro is printf() */
  34. /* #define FDB_PRINT(...) my_printf(__VA_ARGS__) */
  35. /* print debug information */
  36. //#define FDB_DEBUG_ENABLE
  37. #endif /* _FDB_CFG_H_ */