中断服务函数名必须与启动文件中预设的中断服务函数名一样.
void EXTI9_5_IRQHandler(void)
{
u32 Temp = 0x00;
PEout(2) = ~PEout(2);
Temp = EXTI->PR; //取读是那个引脚的中断
switch(Temp)
{
case Exti_From_Pin8:
EXTI_ClearITPendingBit(EXTI_Line8);
break;
case Exti_From_Pin9:
if(Sys_Status < MAX_STATUS)
{
Sys_Status ++;
}
EXTI_ClearITPendingBit(EXTI_Line9);
break;
default:break;
}
}
---------------------
作者:蚂蚁取经
来源:CSDN
原文:
https://blog.csdn.net/zhengyanan815/article/details/72875501
版权声明:本文为博主原创文章,转载请附上博文链接!