这是ST10F27x_can.h里的头文件定义的结构体
typedef volatile struct{
vu16 CR;
vu16 SR;
vu16 ERR;
vu16 BTR;
vu16 IDR;
vu16 TESTR;
vu16 BRPR;
u16 EMPTY0;
CAN_MsgObj_TypeDef sMsgObj[2];
u16 EMPTY1[8];
vu16 TXR1R;
vu16 TXR2R;
u16 EMPTY2[6];
vu16 ND1R;
vu16 ND2R;
u16 EMPTY3[6];
vu16 IP1R;
vu16 IP2R;
u16 EMPTY4[6];
vu16 MV1R;
vu16 MV2R;
} CAN_TypeDef;
编译产生错误:第65行,warning C34: 'CAN_TypeDef': missing declaration specifiers,在头文件里面定义了的啊?
ST10F27x_can.h(44): error C25: syntax error near 'unsigned'
ST10F27x_can.h(44): error C25: syntax error near ')'
ST10F27x_can.h(65): error C25: syntax error near '}'
ST10F27x_can.h(65): warning C34: 'CAN_TypeDef': missing declaration specifiers
ST10F27x_can.h(163): error C25: syntax error near '*'
ST10F27x_can.h(164): error C25: syntax error near '*'
ST10F27x_can.h(165): error C25: syntax error near '*'
ST10F27x_can.h(166): error C25: syntax error near '*'
ST10F27x_can.h(167): error C25: syntax error near '*'
ST10F27x_can.h(168): error C25: syntax error near '*'
ST10F27x_can.h(169): error C25: syntax error near '*'
ST10F27x_can.h(170): error C25: syntax error near '*'
ST10F27x_can.h(170): error C7: compilation aborted
求助呀?
编译环境是Keil uVerison4 ,有没有遇到同样问题的啊?
------解决方案--------------------
头文件包含路径有问题