mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-06 21:54:34 +08:00
Update drv_gpio.c
one more bug fixed
This commit is contained in:
parent
6cb39a15a6
commit
14d64a1dff
@ -349,15 +349,15 @@ static rt_err_t gd32vf_pin_irq_enable(struct rt_device *device, rt_base_t pin,
|
|||||||
{
|
{
|
||||||
return RT_ENOSYS;
|
return RT_ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
irqindex = bit2bitno(index->pin);
|
||||||
|
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
||||||
|
{
|
||||||
|
return RT_ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
if (enabled == PIN_IRQ_ENABLE)
|
if (enabled == PIN_IRQ_ENABLE)
|
||||||
{
|
{
|
||||||
irqindex = bit2bitno(index->pin);
|
|
||||||
if (irqindex < 0 || irqindex >= ITEM_NUM(pin_irq_map))
|
|
||||||
{
|
|
||||||
return RT_ENOSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
level = rt_hw_interrupt_disable();
|
level = rt_hw_interrupt_disable();
|
||||||
|
|
||||||
if (pin_irq_hdr_tab[irqindex].pin == -1)
|
if (pin_irq_hdr_tab[irqindex].pin == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user