rp2040/gpio: Fix debug assertion for interrupts.

The previous interrupt implementation allowed only one single interrupt
mode to be selected. The debug assertion is now updated to allow the
entire range of possible interrupt combinations (a 4-bit field), up to
0xf.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
Matteo Golin 2025-05-08 22:27:32 -04:00 committed by Xiang Xiao
parent 7a64c86c1b
commit 81060b6721

View file

@ -302,7 +302,7 @@ int rp2040_gpio_irq_attach(uint32_t gpio, uint32_t intrmode,
}
DEBUGASSERT(gpio < RP2040_GPIO_NUM);
DEBUGASSERT(intrmode <= RP2040_GPIO_INTR_EDGE_HIGH);
DEBUGASSERT(intrmode <= 0xf);
/* Save handler information */