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.

添加了库函数后,库函数参数已经定义,却还是提示没有声明定义,只有用直接的地址才不会报错,这怎么解决啊

Other Parts Discussed in Thread: TM4C123GH6PM

GPIOPinConfigure(0x00010803);//GPIO_PB2_I2C0SCL
GPIOPinConfigure(0x00010C03);//GPIO_PB3_I2C0SDA

像这样就不会报错;

如果是这样写:

GPIOPinConfigure(GPIO_PB2_I2C0SCL);//0x00010803
GPIOPinConfigure(GPIO_PB3_I2C0SDA);//0x00010C03

就会报错:

Description Resource Path Location Type
#20 identifier "GPIO_PB2_I2C0SCL" is undefined main.c /I2C line 223 C/C++ Problem

Description Resource Path Location Type
#20 identifier "GPIO_PB3_I2C0SDA" is undefined main.c /I2C line 224 C/C++ Problem

这是为什么呢?