From 7f56898fadce9de1d8cdf186479e86ccd3c4f5f1 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Wed, 27 Nov 2019 14:08:42 +0800 Subject: [PATCH] Update drv_gpio.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加GPIO中断进入退出保护 --- bsp/stm32/libraries/HAL_Drivers/drv_gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c b/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c index 9574e04706..81434d73ce 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_gpio.c @@ -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