初中生
最后登录1970-1-1
在线时间 小时
注册时间2017-6-2
|
本帖最后由 嵌入式小痞子 于 2017-9-29 10:59 编辑
typedef struct
{
const char* filename;
const char* description;
uint32_t start_addr;
uint32_t length;
Burn_Option_Typedef burn_option;
}Aux_Data_Typedef;
typedef enum
{
AUX_DATA_ERROR = -1,
AUX_XBF_XINSONGTI,
AUX_HZLIB,
AUX_GB2312,
AUX_UNIGBK,
AUX_FILE_SYSTEM,
AUX_MAX_NUM,
} aux_data_t;
Aux_Data_Typedef burn_data[AUX_MAX_NUM]=
{
[AUX_XBF_XINSONGTI] =
{
.filename = "0:/srcdata/songti.xbf",
.description = "XBF?",
.start_addr = 60*4096 ,
.length = 317*4096,
.burn_option = UPDATE,
},
[AUX_HZLIB] =
{
.filename = "0:/srcdata/HZLIB.bin",
.description = "?",
.start_addr = 1*4096 ,
.length = 53*4096,
.burn_option = UPDATE,
},
[AUX_GB2312] =
{
.filename = "0:/srcdata/GB2312_H1616.FON",
.description = "GB2312?",
.start_addr = 387*4096 ,
.length = 64*4096,
.burn_option = UPDATE,
},
[AUX_UNIGBK] =
{
.filename = "0:/srcdata/UNIGBK.BIN",
.description = "(emWin,UNIGBK.BIN)",
.start_addr = 465*4096 ,
.length = 43*4096,
.burn_option = UPDATE,
},
[AUX_FILE_SYSTEM] =
{
.filename = "",
.description = "FATFS",
.start_addr = 512*4096 ,
.length = 1536*4096,
.burn_option = DO_NOT_UPDATE,
}
}
各位大神 这段F1 刷FLASH的代码我在VC上编译不通过,是编译器的问题吗?
结构体初始化和数组初始化是用{},如果嵌套就用{ {},{},{},{}}.... 可以这种数组里面用 .体成员 赋值的没有遇见过,哪位大神帮我解析下。谢谢啦
|
|