Part Number:TMS320F28335
My program is like this:
#include "DSP2833x_Device.h"
#include "DSP2833x_Examples.h"
#include "leds.h"
void main()
{
InitSysCtrl(); //系统时钟初始化,默认已开启所有外设时钟
LED_Init();
int i = 0;
while(1)
{
i++;
if(i%2==0)
{
LED1_TOGGLE;
}
delay();
}
}
I made a macro definition in the leds.h file:
#define LED1_ON (GpioDataRegs.GPCCLEAR.bit.GPIO68 = 1)
#define LED1_OFF (GpioDataRegs.GPCSET.bit.GPIO68 = 1)
#define LED1_TOGGLE (GpioDataRegs.GPCTOGGLE.bit.GPIO68 = 1)
But during the compilation process, it says that I have not defined a macro:
"../Users/main.c", line 50: error #20: identifier "LED1_TOGGLE" is undefined
Green Deng:
这个就比较奇怪了,看程序没什么问题
其他两个宏定义能正常引用吗?或者在main.c中进行定义的话能正常使用吗?
,
Cirs Li:
是的,其他的宏定义就能够正常引用,所以我就非常纳闷