void EXTI10_15_IRQnCallBack(uint32_t gpioNum)
{
if ((gpioNum == K6_PIN) && (K6_IN == 0))//中断进入后,判断K6引脚电平,如果为0,说明K6按下
{
LED3 =!LED3 ;
}
}
void EXIT_Init(void)
{
/* init gpio as output mode */
GPIO_SetDir(K6_PIN, 1);
GPIO_SetDir(K7_PIN, 1);
GPIO_EnableGPIOExtInt(K6_PIN,EXTI_Trigger_Falling);
GPIO_EnableGPIOExtInt(K7_PIN,EXTI_Trigger_Falling);
GPIO_SetEventCallback(K6_PIN, EXTI10_15_IRQnCallBack);//设置中断回调函数
GPIO_SetEventCallback(K7_PIN, EXTI10_15_IRQnCallBack);//设置中断回调函数
LED2 = 1;
LED3 = 1;
}
各位大佬,为什么进不了中断呢?头文件都有
|