2024-07-15 09:22:55 +00:00
|
|
|
|
/*
|
|
|
|
|
* inflash.h
|
|
|
|
|
*
|
|
|
|
|
* Created on: 2024<EFBFBD><EFBFBD>6<EFBFBD><EFBFBD>24<EFBFBD><EFBFBD>
|
|
|
|
|
* Author: psx
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef APP_INC_INFLASH_H_
|
|
|
|
|
#define APP_INC_INFLASH_H_
|
|
|
|
|
|
|
|
|
|
#include "debug.h"
|
2024-08-19 08:58:08 +00:00
|
|
|
|
#include "communication_protocol.h"
|
2024-07-15 09:22:55 +00:00
|
|
|
|
|
|
|
|
|
#pragma pack(push,1)
|
|
|
|
|
typedef struct _config_info{
|
|
|
|
|
uint8_t start_Flag[2]; /* <20><>ʼ<EFBFBD><CABC>־ */
|
|
|
|
|
uint8_t address[7]; /* <20><>ַ */
|
|
|
|
|
uint8_t end_Flag; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
|
2024-08-19 08:58:08 +00:00
|
|
|
|
SL_Head_pack headPack; /* <20><>ͷ */
|
|
|
|
|
SL_Tail_pack tailPack; /* <20><>ͷ */
|
2024-07-15 09:22:55 +00:00
|
|
|
|
}config_info;
|
|
|
|
|
#define CONFIG_INFO_SIZE (sizeof(config_info))
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
|
|
extern config_info g_slConfigInfo;
|
|
|
|
|
|
|
|
|
|
#define FLASH_SAVE_ADDR_BEGIN (0x00)
|
|
|
|
|
#define FLASH_SAVE_ADDR_END (0x00 + CONFIG_INFO_SIZE)
|
|
|
|
|
|
|
|
|
|
void save_config_info(config_info save_config_info);
|
|
|
|
|
uint8_t read_config_info(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* APP_INC_INFLASH_H_ */
|