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.

cc2538的GPIO控制需要哪些函数?我看了例子,还是不明白,IOCPadConfigSet是做什么用的?



我用下面这两行去控制 LED,结果 有一个亮,有一个不能亮,是什么原因呢?是不是少了什么设置代码。

GPIOPinTypeGPIOOutput(GPIO_B_BASE, GPIO_PIN_0);

GPIOPinTypeGPIOOutput(GPIO_B_BASE, GPIO_PIN_0);

GPIOPinWrite(GPIO_B_BASE, GPIO_PIN_0, 1);

GPIOPinTypeGPIOOutput(GPIO_B_BASE, GPIO_PIN_1);
GPIOPinTypeGPIOOutput(GPIO_B_BASE, GPIO_PIN_1);
GPIOPinWrite(GPIO_B_BASE, GPIO_PIN_1, 1);