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.

CCSV5编译报错



#pragma vector=TIMER1_A1_VECTOR
__interrupt void TimerA1Interrupt(void)
{
switch(__even_in_range(TA2IV,14))
{
case 2:
if(TempDataPointer==0)//第一次捕获只记录不计算
{
TempData0=TA1CCR1;
TempDataPointer=1;
Init=1;
}
if(TempDataPointer==1)//第二次捕获,计算Num值
{
TempData1=TA1CCR1;
LowFrequenceNum=TempData1+65537*LOverflowTime-TempData0;
GEARS=0;
TempDataPointer=0;
TA1CTL|=MC_0; //关闭定时器
}
break;
case 14:
if(Init==1)
LOverflowTime++;
break;
default:break;
}
}

这个是中断函数,其一二行分别报错编译报错:#612 this kind of pragma may not be used here

#68 expected a "}"

请问是什么原因。整个工程刚开始没有报错,后来程序改了一下,就一直报这两个错了。新建也不行