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.

新手:F2812程序中的宏定义的变量在中断处理函数中无法识别,求各位高手指教,谢谢了

我在主函数所在的C文件中定义了3个宏变量,但是在中断处理C文件中无法识别

变量

#include "DSP28_Device.h"
#include "DSP28_Globalprototypes.h"
Uint32 intcount;
int increase;
int decrease;

中断处理中变量的调用显示:

"DSP28_DefaultIsr.c", line 5: error: identifier "intcount" is undefined
"DSP28_DefaultIsr.c", line 8: error: identifier "increase" is undefined
"DSP28_DefaultIsr.c", line 8: error: identifier "decrease" is undefined

这是什么原因造成的,希望指点一二,谢谢!

 

  • Uint32 intcount;
    int increase;
    int decrease;

    这三个变量确定定义合理     Uint32应该是个宏定义   

    int又是类型   

    中断函数和主函数在同一个c文件吧   如果不在  肯定不能调用啊