This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 81060b6721 rp2040/gpio: Fix debug assertion for interrupts.
81060b6721 is described below

commit 81060b6721f0f4877c01dbfcdc331c4feb5c9ec0
Author: Matteo Golin <matteo.go...@gmail.com>
AuthorDate: Thu May 8 22:27:32 2025 -0400

    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.go...@gmail.com>
---
 arch/arm/src/rp2040/rp2040_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/rp2040/rp2040_gpio.c 
b/arch/arm/src/rp2040/rp2040_gpio.c
index c2a20c0713..4e26d8fc05 100644
--- a/arch/arm/src/rp2040/rp2040_gpio.c
+++ b/arch/arm/src/rp2040/rp2040_gpio.c
@@ -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 */
 

Reply via email to