| 1234567891011121314151617181920212223242526272829303132333435 |
- /*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2026-07-08 Administrator the first version
- */
- #ifndef APPLICATIONS_APP_FLASHDB_C_
- #define APPLICATIONS_APP_FLASHDB_C_
- #include <flashdb.h>
- #include <stddef.h>
- typedef struct
- {
- uint8_t iSave; //存储标志位
- uint8_t freq_filter; //滤网自动更换周期
- uint8_t worked_day; //已采集天数
- uint32_t tape_max; //胶带最大使用量(长度)
- uint32_t filter_max; //滤网最大使用量(长度)
- uint32_t tape_used; //胶带使用量
- uint32_t filter_used; //滤网使用量
- }Flashdb_typedef;
- int app_flashdb_init(void);
- int app_flashdb_save(const char *key, void *value);
- int app_flashdb_load(const char *key, void *value);
- /* EasyFlash 兼容接口(底层为 FlashDB KVDB),业务代码无需改动 */
- size_t ef_get_env_blob(const char *key, void *value_buf, size_t buffer_len, size_t *saved_value_len);
- int ef_set_env_blob(const char *key, const void *value_buf, size_t size);
- #endif /* APPLICATIONS_APP_FLASHDB_C_ */
|