tnfh.net
当前位置:首页 >> STM32中断问题:iF(EXTI_GEtITStAtus(EXTI_LinE5)=... >>

STM32中断问题:iF(EXTI_GEtITStAtus(EXTI_LinE5)=...

ITStatus EXTI_GetITStatus(uint32_t EXTI_Line) { ITStatus bitstatus = RESET; uint32_t enablestatus = 0; /* Check the parameters */ assert_param(IS_GET_EXTI_LINE(EXTI_Line)); enablestatus = EXTI->IMR & EXTI_Line; //1 if (((EXTI->...

void BUTTON_Init(void){ EXTI_InitTypeDef EXTI_InitStructure; RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | \ RCC_APB2Periph_GPIOC, ENABLE); GPIO_Config(GPIOA, GPIO_Pin_0, GPIO_Speed_10MHz, GPIO_Mode_IPU);...

编写 void EXTI9_5_IRQHandler (void) 和 void EXTI15_10_IRQHandler(void)对EXTI5-EXTI15中断处理,在函数里面通过查询挂起寄存器(EXTI->PR或FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line))来看是哪个中断发生。

网站首页 | 网站地图
All rights reserved Powered by www.tnfh.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com