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

acassis 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 d1a0d8bed51 arch/rp23xx/adc: fix compilation error due to undeclared 
GPIO_FUNC_NULL
d1a0d8bed51 is described below

commit d1a0d8bed51bb19985792ea066f296be2c8c5101
Author: Sarthak Pandey <[email protected]>
AuthorDate: Mon Oct 12 11:00:35 2026 +0530

    arch/rp23xx/adc: fix compilation error due to undeclared GPIO_FUNC_NULL
    
    Enabling ADC support under RP23XX architectures resulted in a compilation 
error:
    
    chip/rp23xx_adc.c:475:44: error: 'GPIO_FUNC_NULL' undeclared (first use in 
this function); did you mean 'RP23XX_GPIO_FUNC_NULL'?
    
    The GPIO headers for RP23XX define RP23XX_GPIO_FUNC_NULL rather than 
GPIO_FUNC_NULL.
    Update my_reset() in both ARM and RISC-V rp23xx ADC drivers to use 
RP23XX_GPIO_FUNC_NULL.
    
    Fixes #15664
    
    Signed-off-by: Sarthak Pandey <[email protected]>
---
 arch/arm/src/rp23xx/rp23xx_adc.c       | 2 +-
 arch/risc-v/src/rp23xx-rv/rp23xx_adc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/rp23xx/rp23xx_adc.c b/arch/arm/src/rp23xx/rp23xx_adc.c
index 8281773ad48..1576fe049ef 100644
--- a/arch/arm/src/rp23xx/rp23xx_adc.c
+++ b/arch/arm/src/rp23xx/rp23xx_adc.c
@@ -476,7 +476,7 @@ static void my_reset(struct adc_dev_s *dev)
       if (a_gpio >= 0)
         {
           rp23xx_gpio_setdir(a_gpio, false);
-          rp23xx_gpio_set_function(a_gpio, GPIO_FUNC_NULL);
+          rp23xx_gpio_set_function(a_gpio, RP23XX_GPIO_FUNC_NULL);
           rp23xx_gpio_set_pulls(a_gpio, false, false);
         }
     }
diff --git a/arch/risc-v/src/rp23xx-rv/rp23xx_adc.c 
b/arch/risc-v/src/rp23xx-rv/rp23xx_adc.c
index 50c314cb8b4..ff8107c9657 100644
--- a/arch/risc-v/src/rp23xx-rv/rp23xx_adc.c
+++ b/arch/risc-v/src/rp23xx-rv/rp23xx_adc.c
@@ -472,7 +472,7 @@ static void my_reset(struct adc_dev_s *dev)
       if (a_gpio >= 0)
         {
           rp23xx_gpio_setdir(a_gpio, false);
-          rp23xx_gpio_set_function(a_gpio, GPIO_FUNC_NULL);
+          rp23xx_gpio_set_function(a_gpio, RP23XX_GPIO_FUNC_NULL);
           rp23xx_gpio_set_pulls(a_gpio, false, false);
         }
     }

Reply via email to