boards/arm/rp2040: fix implicit declaration of function 'rp2040_dev_gpio_init'

- Created a file rp2040_common_pico.h with function
   prototype

     int rp2040_dev_gpio_init(void);

 to allow cmake + ninja to build without errors.

 - Updated file rp2040_pico.h with

for all boards.

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18
2025-09-22 16:49:32 +02:00
committed by Xiang Xiao
parent 4c3dbed5b5
commit 3a08a0e3fd
13 changed files with 84 additions and 11 deletions

1
arch/arm/src/rp2040/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
rp2040_boot_stage2.S

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -0,0 +1,72 @@
/****************************************************************************
* boards/arm/rp2040/common/include/rp2040_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_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H
#define __BOARDS_ARM_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* 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: rp2040_dev_gpio_init
****************************************************************************/
#ifdef CONFIG_DEV_GPIO
int rp2040_dev_gpio_init(void);
#endif
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* __BOARDS_ARM_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H */

View File

@@ -36,7 +36,7 @@
#include <arch/board/board.h>
#include "rp2040_pico.h"
#include "rp2040_common_pico.h"
#include "rp2040_common_bringup.h"
#ifdef CONFIG_LCD_BACKPACK

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -48,7 +48,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -37,7 +37,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -48,7 +48,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -31,7 +31,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif

View File

@@ -29,7 +29,7 @@
int rp2040_bringup(void);
#ifdef CONFIG_DEV_GPIO
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON)
int rp2040_dev_gpio_init(void);
#endif