mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:53:34 +08:00
board_name.c: remove the file and HW_ARCH macro, use px4_board_name() instead
boards define BOARD_NAME, so board_name() is not necessary. HW_ARCH was just a wrapper around board_name(). This patch simplifies to having only one common method px4_board_name().
This commit is contained in:
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__aerocore
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
aerocore_init.c
|
||||
aerocore_timer_config.c
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__aerofc-v1
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
aerofc_init.c
|
||||
aerofc_spi.c
|
||||
aerofc_usb.c
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__auav-x21
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
auav_can.c
|
||||
auav_init.c
|
||||
|
||||
@@ -100,16 +100,6 @@
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_name
|
||||
*
|
||||
* Description:
|
||||
* All boards must provide this API to return the board name.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT const char *board_name(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_dma_alloc_init
|
||||
*
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file board_name.c
|
||||
*
|
||||
* Provide the board_name interface.
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include "board_config.h"
|
||||
#include <lib/version/version.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_name
|
||||
*
|
||||
* Description:
|
||||
* All boards must provide this API to return the board name.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT const char *board_name()
|
||||
{
|
||||
return BOARD_NAME;
|
||||
}
|
||||
@@ -33,7 +33,6 @@
|
||||
px4_add_module(
|
||||
MODULE drivers__boards__crazyflie
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
crazyflie_init.c
|
||||
crazyflie_usb.c
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_dma_alloc.c
|
||||
../common/board_name.c
|
||||
mindpx_can.c
|
||||
mindpx2_init.c
|
||||
mindpx_timer_config.c
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
px4_add_module(
|
||||
MODULE drivers__boards__px4-stm32f4discovery
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
px4discovery_init.c
|
||||
px4discovery_usb.c
|
||||
px4discovery_led.c
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__px4fmu-v1
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
px4fmu_can.c
|
||||
px4fmu_init.c
|
||||
px4fmu_timer_config.c
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__px4fmu-v2
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
px4fmu_can.c
|
||||
px4fmu2_init.c
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__px4fmu-v4
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
px4fmu_can.c
|
||||
px4fmu_init.c
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MODULE drivers__boards__tap-v1
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
../common/board_name.c
|
||||
../common/board_dma_alloc.c
|
||||
tap_init.c
|
||||
tap_pwr.c
|
||||
|
||||
Reference in New Issue
Block a user