This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

2812编译出错的问题



我写了个2812程序,编译有错误。
程序出错行:
EvaRegs.COMCONA.bit.SVENABLE=1;   //使能空间矢量PWM模式
    EvaRegs.COMCONA.bit.FCOMPOE=1; //使能PWM输出引脚
错误提示:
"aci3_1.c", line 121: error: expected a field name
"aci3_1.c", line 122: error: expected a field name
请高手指教,谢谢!

我看了下,结构体定义没问题:
struct COMCONA_BITS {
   Uint16   C1TRIPE:1;      // 0      C1TRIP enable
   Uint16   C2TRIPE:1;      // 1      C2TRIP enable
   Uint16   C3TRIPE:1;      // 2      C3TRIP eanble
   Uint16   rsvd:2;         // 4:3    reserved
   Uint16   FCMP1OE:1;      // 5      Full compare 1 output enable
   Uint16   FCMP2OE:1;      // 6      Full compare 2 output enable
   Uint16   FCMP3OE:1;      // 7      Full compare 3 output enable
   Uint16   PDPINTASTATUS:1;// 8      Current status of the PDPINTA pin
   Uint16   FCOMPOE:1;      // 9      Compare output enable
   Uint16   ACTRLD:2;       // 11:10  Action control register reload
   Uint16   SVENABLE:1;     // 12     Space vector PWM Mode enable
   Uint16   CLD:2;          // 14:13  Compare register reload condition
   Uint16   CENABLE:1;      // 15     Compare enable
};