[bsp/air32f103]:修复外部中断无效

This commit is contained in:
蒙蒙plus 2023-10-30 00:02:30 +08:00 committed by Meco Man
parent 65623777d5
commit 32ec9e32ec
1 changed files with 1 additions and 2 deletions

View File

@ -374,13 +374,12 @@ static rt_err_t air32_pin_irq_enable(struct rt_device *device, rt_base_t pin,
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
gpio_port_souce=PIN_PORT(pin);
GPIO_EXTILineConfig(gpio_port_souce,(rt_uint8_t)irqindex);
EXTI_InitStructure.EXTI_Line = irqmap->irqbit;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
gpio_port_souce=PIN_PORT(pin);
EXTI_Init(&EXTI_InitStructure);
rt_hw_interrupt_enable(level);