flash.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef FLASH_H
  2. #define FLASH_H
  3. #include <flashdb.h>
  4. extern uint8_t isCC;
  5. extern uint8_t isTag; //是否含识读标签
  6. extern uint8_t isnewLora; //用lora协议
  7. extern struct fdb_kvdb kvdb;
  8. extern struct fdb_tsdb ts_keydb;
  9. extern struct fdb_tsdb ts_plandb;
  10. extern struct fdb_tsdb ts_weightdb;
  11. extern uint8_t XbeeConst_DeviceAddress;
  12. extern uint8_t XbeeConst_NetAddress;
  13. extern uint8_t XbeeConst_UseAPI;
  14. extern uint8_t WeightConst_TQ;
  15. extern uint8_t WeightConst_BLE;
  16. extern uint8_t WeightConst_ChanCheShu;
  17. extern uint8_t WeightConst_SBType;
  18. extern int16_t WeightConst_WeightBegin; //按键开始重量
  19. extern uint8_t ad_Percent; // 7, 校正重量,1字节
  20. extern uint32_t ad_Maxval; // 8, 最大称量,4字节
  21. extern uint8_t ad_FS; // 12, 滤波深度,1字节
  22. extern uint8_t ad_Point; // 13, 小数点, 1字节
  23. extern uint8_t ad_Inteval; // 14, 分度值, 1字节
  24. extern float ad_Spanz; // 15, 分度内码数, 4字节
  25. extern uint32_t ad_Zero; // 19, 真零内码, 4字节
  26. extern uint32_t ad_Tare; // 23, 皮零内码, 4字节
  27. extern uint32_t tsdb_recordcount(const char key);
  28. extern void write_Flash(const char *key, const void *value_buf, size_t buf_len);
  29. extern uint8_t ts_pushArrary(fdb_tsdb_t db, uint8_t *buf, uint8_t length);
  30. extern void findF8(void);
  31. extern uint32_t findkey(uint8_t i);
  32. extern uint32_t findweight(void);
  33. extern uint32_t findplan(void);
  34. extern uint32_t findNextplan(void);
  35. extern void findF12(void);
  36. extern void save_read_ts(const char key);
  37. extern void reset_read_ts(const char key);
  38. extern void onbordflash_init(void);
  39. extern void setNetAddress(void);
  40. extern void setAPI(void);
  41. extern void init_allflash(void);
  42. extern void back_read_plan(void);
  43. #endif