[code=c] /* EXTI line(PE5) mode config */
GPIO_EXTILineConfig(GPIO_PortSourceGPIOE, GPIO_PinSource5);
EXTI_InitStructure.EXTI_Line = EXTI_Line5;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; //下降沿中断
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure); // 配置中断引脚、触发状态等
/* EXTI line(PC5) mode config */
GPIO_EXTILineConfig(GPIO_PortSourceGPIOC, GPIO_PinSource5);
EXTI_InitStructure.EXTI_Line = EXTI_Line5;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; //下降沿中断
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure); [/code]
今天回来看外中断部分,突然有个想法,如果出现上面这种情况在中断服务函数里该怎么区分?
如果全部都使用 9..5这些外部中断,那么服务函数全部都在 EXTI9_5_IRQHandler()函数里面,那也就是说 VET6的片子最多会有 25个中断服务程序在这个函数中,当这些中断的优先级设置的不统一的时候 EXTI9_5_IRQHandler()的中断优先级是怎么判断的?默认选择最高的? |