From 8baa788484d92ff43ba5e9eac51c3107dbf12ffd Mon Sep 17 00:00:00 2001 From: simbit18 <101105604+simbit18@users.noreply.github.com> Date: Thu, 2 Oct 2025 16:00:32 +0200 Subject: [PATCH] boards/arm/rp23xx: fix implicit declaration of function rp23xx_dev_gpio_init - Created a file rp23xx_common_pico.h with function prototype int rp23xx_dev_gpio_init(void); to allow cmake + ninja to build without errors. - Updated file rp23xx_pico.h with for all boards. Signed-off-by: simbit18 --- .../common/include/rp23xx_common_pico.h | 72 +++++++++++++++++++ .../rp23xx/common/src/rp23xx_common_bringup.c | 2 +- .../pimoroni-pico-2-plus/src/rp23xx_pico.h | 2 +- .../raspberrypi-pico-2/src/rp23xx_pico.h | 2 +- .../arm/rp23xx/xiao-rp2350/src/rp23xx_pico.h | 2 +- 5 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 boards/arm/rp23xx/common/include/rp23xx_common_pico.h diff --git a/boards/arm/rp23xx/common/include/rp23xx_common_pico.h b/boards/arm/rp23xx/common/include/rp23xx_common_pico.h new file mode 100644 index 0000000000..fb2bbd6555 --- /dev/null +++ b/boards/arm/rp23xx/common/include/rp23xx_common_pico.h @@ -0,0 +1,72 @@ +/**************************************************************************** + * boards/arm/rp23xx/common/include/rp23xx_common_pico.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_COMMON_PICO_H +#define __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_COMMON_PICO_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: rp23xx_dev_gpio_init + ****************************************************************************/ + +#ifdef CONFIG_DEV_GPIO +int rp23xx_dev_gpio_init(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_COMMON_PICO_H */ diff --git a/boards/arm/rp23xx/common/src/rp23xx_common_bringup.c b/boards/arm/rp23xx/common/src/rp23xx_common_bringup.c index 19b25c5685..46d1e4cdbe 100644 --- a/boards/arm/rp23xx/common/src/rp23xx_common_bringup.c +++ b/boards/arm/rp23xx/common/src/rp23xx_common_bringup.c @@ -33,7 +33,7 @@ #include -#include "rp23xx_pico.h" +#include "rp23xx_common_pico.h" #include "rp23xx_common_bringup.h" #ifdef CONFIG_RP23XX_PWM diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_pico.h b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_pico.h index b70c38ae9e..f98ba60fe6 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_pico.h +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_pico.h @@ -46,7 +46,7 @@ int rp23xx_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp23xx_dev_gpio_init(void); #endif diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_pico.h b/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_pico.h index 3235b21116..75dfcce860 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_pico.h +++ b/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_pico.h @@ -46,7 +46,7 @@ int rp23xx_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp23xx_dev_gpio_init(void); #endif diff --git a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_pico.h b/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_pico.h index 8d85561773..e26d42e460 100644 --- a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_pico.h +++ b/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_pico.h @@ -35,7 +35,7 @@ int rp23xx_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp23xx_dev_gpio_init(void); #endif