#ifndef  _DATA_SAVE_H
#define  _DATA_SAVE_H

#include "CH57x_common.h"		//CH57X 库包含头文件
#include "gattprofile.h"
#include "PC_DeviceTest_Fun.h"

#define DATAFLASH_SAVE_START_ADDR  FLASH_MCU_BLE_START_ADDRESS    //保存参数地址 dataflash 共2K

// Minimum connection interval (units of 1.25ms, 20=25ms) 
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL     20

// Maximum connection interval (units of 1.25ms, 100=125ms)
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL     100

#define FALSH_SAVE_HEAD  2      //flash保存的头

#pragma pack(1)

typedef struct
{
	uint8 flash_save_head:2;    //区分flash数据的头
	uint8 flash_save_flg:1;     //保存标志
	uint8 bleName_len:5;        //蓝牙名长度
	
	uint8 scanRspData[31];     //扫描参数
	
}DataFlash_Save_T;

#pragma pack()


extern DataFlash_Save_T dataFlash_save_t;

void DataFlash_Save_Init(void);
void DataFlash_Save_Task(void);









#endif
