Merge pull request #3663 from nongxiaoming/fix_bug

[bsp][imxrt] fix the gpio drivers warning,'int_mode' may be used unin…
This commit is contained in:
Bernard Xiong 2020-06-07 23:34:24 +08:00 committed by GitHub
commit ce83371504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -559,6 +559,9 @@ static rt_err_t imxrt_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt
case PIN_IRQ_MODE_LOW_LEVEL:
int_mode = kGPIO_IntLowLevel;
break;
default:
int_mode = kGPIO_IntRisingEdge;
break;
}
irq_index = (port << 1) + (pin_num >> 4);
GPIO_PinSetInterruptConfig(mask_tab[port].gpio, pin_num, int_mode);