"DSP28_DefaultIsr.c", line 555: warning: variable "f" was set but never used
下面是我的捕获单元的中断函数,分析程序之后觉得应该没问题的啊,但是总是出现说“f”被定义了却被使用,这是什么原因呢?以前也有遇到这类的问题,还请帮忙解决一下,非常感谢!
interrupt void CAPINT1_ISR(void) // 捕获单元1中断
{
unsigned int temp;
unsigned int capnum1;
unsigned int capnum2;
float f;
capnum1=EvaRegs.CAP1FIFO;
capnum2=EvaRegs.CAP1FIFO;
if(capnum2>capnum1)
temp=capnum2-capnum1;
else
temp=capnum2+(0xFFFF-capnum1);
f=2343750.0/(float)temp; //f=150MHZ/64temp=2343750.0/(float)temp
PieCtrl.PIEACK.all=PIEACK_GROUP3; //响应同组其他中断
EvaRegs.EVAIFRC.bit.CAP1INT=1; //清除中断标志位
EINT;//开全局中断
// 返回;
} |