瀏覽代碼

Fix bsp/k210/driver/drv_gpio.c error

ZhaoJiasheng 4 年之前
父節點
當前提交
ad41afbc65
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      bsp/k210/driver/drv_gpio.c

+ 2 - 2
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;