
程序如下
#define tBoolean int
#define GPIO_PORTA_BASE g_pulGPIOBaseAddrs[0]
#include "lib/gpio.h"
//#include "lib/inc/lm4f120h5qr.h"
#include "lib/sysctl.h"
int main()
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,GPIO_PIN_0);
while(1)
{
}
}
编译总是提示:
main.c(10): error: #20: identifier "g_pulGPIOBaseAddrs" is undefined
g_pulGPIOBaseAddrs中GPIO_PORTA_BASE的定义在这里
tBoolean变量没有定义我在程序头定义成了#define tBoolean int,这个对吗,我定义成bool,总是提示bool没定义
望各位指点