Update drv_gpio.c

增加GPIO中断进入退出保护
This commit is contained in:
HubretXie 2019-11-27 14:08:42 +08:00 committed by GitHub
parent 3c2bfa2349
commit 7f56898fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -654,6 +654,7 @@ void EXTI2_3_IRQHandler(void)
}
void EXTI4_15_IRQHandler(void)
{
rt_interrupt_enter();
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_6);
@ -666,6 +667,7 @@ void EXTI4_15_IRQHandler(void)
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_14);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_15);
rt_interrupt_leave();
}
#else