stm32如何在中断服务程序里关闭EXTI中断?
2个回答
展开全部
那个中断已经被触发了,你要做的只有是清中断标志位:
EXTI_ClearITPendingBit(EXTI_Line14);
EXTI_ClearFlag(EXTI_Line14);
非要关的话,我觉得这样就关了
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_LineCmd = DISABLE; //ENABLE
EXTI_Init(&EXTI_InitStructure);
EXTI_ClearITPendingBit(EXTI_Line14);
EXTI_ClearFlag(EXTI_Line14);
非要关的话,我觉得这样就关了
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_LineCmd = DISABLE; //ENABLE
EXTI_Init(&EXTI_InitStructure);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询