!90 修复k210 GPIO引脚中断电平变化的错误

Merge pull request !90 from StupidMalphite/gitee_master
This commit is contained in:
bernard 2021-06-17 08:50:28 +00:00 committed by Gitee
commit 171bd477cf
1 changed files with 2 additions and 2 deletions

View File

@ -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;