Skip to content

Commit

Permalink
[bsp/air32f103]:修复外部中断无效
Browse files Browse the repository at this point in the history
  • Loading branch information
meng-plus authored and mysterywolf committed Oct 29, 2023
1 parent 6562377 commit 32ec9e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bsp/airm2m/air32f103/libraries/rt_drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 32ec9e3

Please sign in to comment.