Here is the file
EvaRegs.T1PR = Period; // Timer2 period
EvaRegs.T1CMPR = Pulse; // Timer2 compare
EvaRegs.T1CNT = 0x0000; // Timer1 counter
EvaRegs.T1CON.all = 0x1042; //连续增计数模式,使能定时器,比较使能
EvaRegs.GPTCONA.bit.TCMPOE = 1;//设置引脚T1PWM_T1CMP、T2PWM_T2CMP由定时器1和2独立驱动
EvaRegs.GPTCONA.bit.T1PIN = 1; //设置低有效
"../ADC.c", line 79: error: identifier "EvaRegs" is undefined 1 error detected in the compilation of "../ADC.c".
What's wrong? Can you help me? Thank you .With my best wishes.
Martin Yu:
没定义机构体EvaRegs,仔细查下头文件包含、变量定义等部分。
Here is the file
EvaRegs.T1PR = Period; // Timer2 period
EvaRegs.T1CMPR = Pulse; // Timer2 compare
EvaRegs.T1CNT = 0x0000; // Timer1 counter
EvaRegs.T1CON.all = 0x1042; //连续增计数模式,使能定时器,比较使能
EvaRegs.GPTCONA.bit.TCMPOE = 1;//设置引脚T1PWM_T1CMP、T2PWM_T2CMP由定时器1和2独立驱动
EvaRegs.GPTCONA.bit.T1PIN = 1; //设置低有效
"../ADC.c", line 79: error: identifier "EvaRegs" is undefined 1 error detected in the compilation of "../ADC.c".
What's wrong? Can you help me? Thank you .With my best wishes.
mike king:
回复 Martin Yu:
这个程序建立工程的时候是不是不要添加Ev.c标准C程序。我的scouse库里面没找到这个