flash.h 1.7 KB

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