You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
625 B
32 lines
625 B
#ifndef _APP_DATA_SAVE_H
|
|
#define _APP_DATA_SAVE_H
|
|
|
|
#include "../bsp/bsp_config.h"
|
|
|
|
//定义所使用内存的起始和结尾标志
|
|
#define HEAD0 0xa3
|
|
#define HEAD1 0xa4
|
|
#define TAIL0 0xa5
|
|
#define TAIL1 0xa6
|
|
|
|
#define DATA_SAVE_LEN 10 //寄存器需要存放的最大数量为10组
|
|
|
|
// #define EEPROM_DATA_ADDR 0x00 //定义一个起始地址为0x00的寄存器
|
|
|
|
//用来存储重量数据的结构体(数组)
|
|
typedef struct
|
|
{
|
|
U8 head[2];
|
|
U8 available;
|
|
U8 val;
|
|
U8 tail[2];
|
|
|
|
}DATA_SAVE;
|
|
|
|
extern DATA_SAVE data_save_arr[DATA_SAVE_LEN];
|
|
|
|
|
|
extern void data_save_init(void);
|
|
extern void data_save_push(U8 Data);
|
|
|
|
#endif
|