From ad41afbc65abc334bcfb6064a90e992356877977 Mon Sep 17 00:00:00 2001 From: ZhaoJiasheng <18535861947@163.com> Date: Tue, 22 Dec 2020 17:33:49 +0800 Subject: [PATCH] Fix bsp/k210/driver/drv_gpio.c error --- bsp/k210/driver/drv_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp/k210/driver/drv_gpio.c b/bsp/k210/driver/drv_gpio.c index a6eaaf197d..05ca8fd934 100644 --- a/bsp/k210/driver/drv_gpio.c +++ b/bsp/k210/driver/drv_gpio.c @@ -180,10 +180,10 @@ static rt_err_t drv_pin_attach_irq(struct rt_device *device, rt_int32_t pin, switch (mode) { case PIN_IRQ_MODE_RISING: - irq_table[pin_channel].edge = GPIO_PE_FALLING; + irq_table[pin_channel].edge = GPIO_PE_RISING; break; case PIN_IRQ_MODE_FALLING: - irq_table[pin_channel].edge = GPIO_PE_RISING; + irq_table[pin_channel].edge = GPIO_PE_FALLING; break; case PIN_IRQ_MODE_RISING_FALLING: irq_table[pin_channel].edge = GPIO_PE_BOTH;