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.

GPIO 与PIN

Other Parts Discussed in Thread: CC1310

我在easylink历程里面 发现关于LED的 初始化 是这样的

PIN_Config pinTable[] = {
Board_PIN_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
PIN_TERMINATE
};

void led_init(void)
{
pinHandle = PIN_open(&pinState, pinTable);
Assert_isTrue(pinHandle != NULL, NULL);
PIN_setOutputValue(pinHandle, Board_PIN_LED1, 0);
}

然后 我在gpiointerrupt历程中 发现led是这样初始化的:

/* Call driver init functions */
GPIO_init();

/* Configure the LED and button pins */
GPIO_setConfig(Board_GPIO_LED0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_setConfig(Board_GPIO_LED1, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_setConfig(Board_GPIO_BUTTON0, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);

/* Turn on user LED */
GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);

/* install Button callback */
GPIO_setCallback(Board_GPIO_BUTTON0, gpioButtonFxn0);

/* Enable interrupts */
GPIO_enableInt(Board_GPIO_BUTTON0);

显然 这里有两套API,PIN  与GPIO;

但是  如果我想 更改GPIO的引脚配置,却发现不知道怎么改,因为 所有的GPIO 貌似 都是枚举变量;我根本不知道 这个GPIO与PIN的对应关系;

我现在 由于把1310 7xd的代码  移植到5xd,现在 想用intterupt,这个 怎么改GPIO的引脚配置啊?