mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 17:56:38 +08:00
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:
1
arch/arm/src/rp2040/.gitignore
vendored
Normal file
1
arch/arm/src/rp2040/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
rp2040_boot_stage2.S
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
72
boards/arm/rp2040/common/include/rp2040_common_pico.h
Normal file
72
boards/arm/rp2040/common/include/rp2040_common_pico.h
Normal 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 */
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user