mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 06:36:45 +08:00
Pull v2 pieces up to build with the merge
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 10,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the PX4IOv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IOv2",
|
||||
"version": "2.0",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -100,7 +100,7 @@ all: $(STAGED_FIRMWARES)
|
||||
# is taken care of.
|
||||
#
|
||||
$(STAGED_FIRMWARES): $(IMAGE_DIR)%.px4: $(BUILD_DIR)%.build/firmware.px4
|
||||
@echo %% Copying $@
|
||||
@$(ECHO) %% Copying $@
|
||||
$(Q) $(COPY) $< $@
|
||||
$(Q) $(COPY) $(patsubst %.px4,%.bin,$<) $(patsubst %.px4,%.bin,$@)
|
||||
|
||||
@@ -111,9 +111,9 @@ $(STAGED_FIRMWARES): $(IMAGE_DIR)%.px4: $(BUILD_DIR)%.build/firmware.px4
|
||||
$(BUILD_DIR)%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)%.build/firmware.px4,%,$@)
|
||||
$(BUILD_DIR)%.build/firmware.px4: work_dir = $(BUILD_DIR)$(config).build/
|
||||
$(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4:
|
||||
@echo %%%%
|
||||
@echo %%%% Building $(config) in $(work_dir)
|
||||
@echo %%%%
|
||||
@$(ECHO) %%%%
|
||||
@$(ECHO) %%%% Building $(config) in $(work_dir)
|
||||
@$(ECHO) %%%%
|
||||
$(Q) mkdir -p $(work_dir)
|
||||
$(Q) make -r -C $(work_dir) \
|
||||
-f $(PX4_MK_DIR)firmware.mk \
|
||||
@@ -132,8 +132,6 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4:
|
||||
# XXX Should support fetching/unpacking from a separate directory to permit
|
||||
# downloads of the prebuilt archives as well...
|
||||
#
|
||||
# XXX PX4IO configuration name is bad - NuttX configs should probably all be "px4"
|
||||
#
|
||||
NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export)
|
||||
.PHONY: archives
|
||||
archives: $(NUTTX_ARCHIVES)
|
||||
@@ -146,16 +144,22 @@ endif
|
||||
|
||||
$(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@))
|
||||
$(ARCHIVE_DIR)%.export: configuration = nsh
|
||||
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC) $(NUTTX_APPS)
|
||||
@echo %% Configuring NuttX for $(board)
|
||||
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC)
|
||||
@$(ECHO) %% Configuring NuttX for $(board)
|
||||
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
|
||||
$(Q) make -r -j1 -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && ln -sf $(PX4_BASE)/nuttx-configs/* .)
|
||||
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration))
|
||||
@echo %% Exporting NuttX for $(board)
|
||||
@$(ECHO) %% Exporting NuttX for $(board)
|
||||
$(Q) make -r -j1 -C $(NUTTX_SRC) -r $(MQUIET) export
|
||||
$(Q) mkdir -p $(dir $@)
|
||||
$(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@
|
||||
|
||||
$(NUTTX_SRC):
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) "NuttX sources missing - clone https://github.com/PX4/NuttX.git and try again."
|
||||
@$(ECHO) ""
|
||||
|
||||
#
|
||||
# Cleanup targets. 'clean' should remove all built products and force
|
||||
# a complete re-compilation, 'distclean' should remove everything
|
||||
@@ -170,46 +174,47 @@ clean:
|
||||
distclean: clean
|
||||
$(Q) $(REMOVE) $(ARCHIVE_DIR)*.export
|
||||
$(Q) make -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && find . -type l -depth 1 -delete)
|
||||
|
||||
#
|
||||
# Print some help text
|
||||
#
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo ""
|
||||
@echo " PX4 firmware builder"
|
||||
@echo " ===================="
|
||||
@echo ""
|
||||
@echo " Available targets:"
|
||||
@echo " ------------------"
|
||||
@echo ""
|
||||
@echo " archives"
|
||||
@echo " Build the NuttX RTOS archives that are used by the firmware build."
|
||||
@echo ""
|
||||
@echo " all"
|
||||
@echo " Build all firmware configs: $(CONFIGS)"
|
||||
@echo " A limited set of configs can be built with CONFIGS=<list-of-configs>"
|
||||
@echo ""
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " PX4 firmware builder"
|
||||
@$(ECHO) " ===================="
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " Available targets:"
|
||||
@$(ECHO) " ------------------"
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " archives"
|
||||
@$(ECHO) " Build the NuttX RTOS archives that are used by the firmware build."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " all"
|
||||
@$(ECHO) " Build all firmware configs: $(CONFIGS)"
|
||||
@$(ECHO) " A limited set of configs can be built with CONFIGS=<list-of-configs>"
|
||||
@$(ECHO) ""
|
||||
@for config in $(CONFIGS); do \
|
||||
echo " $$config"; \
|
||||
echo " Build just the $$config firmware configuration."; \
|
||||
echo ""; \
|
||||
done
|
||||
@echo " clean"
|
||||
@echo " Remove all firmware build pieces."
|
||||
@echo ""
|
||||
@echo " distclean"
|
||||
@echo " Remove all compilation products, including NuttX RTOS archives."
|
||||
@echo ""
|
||||
@echo " upload"
|
||||
@echo " When exactly one config is being built, add this target to upload the"
|
||||
@echo " firmware to the board when the build is complete. Not supported for"
|
||||
@echo " all configurations."
|
||||
@echo ""
|
||||
@echo " Common options:"
|
||||
@echo " ---------------"
|
||||
@echo ""
|
||||
@echo " V=1"
|
||||
@echo " If V is set, more verbose output is printed during the build. This can"
|
||||
@echo " help when diagnosing issues with the build or toolchain."
|
||||
@echo ""
|
||||
@$(ECHO) " clean"
|
||||
@$(ECHO) " Remove all firmware build pieces."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " distclean"
|
||||
@$(ECHO) " Remove all compilation products, including NuttX RTOS archives."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " upload"
|
||||
@$(ECHO) " When exactly one config is being built, add this target to upload the"
|
||||
@$(ECHO) " firmware to the board when the build is complete. Not supported for"
|
||||
@$(ECHO) " all configurations."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " Common options:"
|
||||
@$(ECHO) " ---------------"
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " V=1"
|
||||
@$(ECHO) " If V is set, more verbose output is printed during the build. This can"
|
||||
@$(ECHO) " help when diagnosing issues with the build or toolchain."
|
||||
@$(ECHO) ""
|
||||
|
||||
@@ -12,19 +12,14 @@ ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_test
|
||||
#
|
||||
MODULES += drivers/device
|
||||
MODULES += drivers/stm32
|
||||
MODULES += drivers/px4io
|
||||
MODULES += drivers/boards/px4fmuv2
|
||||
MODULES += systemcmds/perf
|
||||
MODULES += systemcmds/reboot
|
||||
|
||||
# needed because things use it for logging
|
||||
MODULES += modules/mavlink
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
MODULES += modules/systemlib
|
||||
MODULES += modules/systemlib/mixer
|
||||
MODULES += modules/uORB
|
||||
|
||||
#
|
||||
@@ -45,7 +45,6 @@ export PX4_INCLUDE_DIR = $(abspath $(PX4_BASE)/src/include)/
|
||||
export PX4_MODULE_SRC = $(abspath $(PX4_BASE)/src)/
|
||||
export PX4_MK_DIR = $(abspath $(PX4_BASE)/makefiles)/
|
||||
export NUTTX_SRC = $(abspath $(PX4_BASE)/NuttX/nuttx)/
|
||||
export NUTTX_APP_SRC = $(abspath $(PX4_BASE)/NuttX/apps)/
|
||||
export MAVLINK_SRC = $(abspath $(PX4_BASE)/mavlink)/
|
||||
export ROMFS_SRC = $(abspath $(PX4_BASE)/ROMFS)/
|
||||
export IMAGE_DIR = $(abspath $(PX4_BASE)/Images)/
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ all: upload-$(METHOD)-$(BOARD)
|
||||
upload-serial-px4fmu-v1: $(BUNDLE) $(UPLOADER)
|
||||
$(Q) $(PYTHON) -u $(UPLOADER) --port $(SERIAL_PORTS) $(BUNDLE)
|
||||
|
||||
upload-serial-px4fmuv2: $(BUNDLE) $(UPLOADER)
|
||||
upload-serial-px4fmu-v2: $(BUNDLE) $(UPLOADER)
|
||||
$(Q) $(PYTHON) -u $(UPLOADER) --port $(SERIAL_PORTS) $(BUNDLE)
|
||||
|
||||
#
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_PX4FMUV2
|
||||
if ARCH_BOARD_PX4FMU_V2
|
||||
endif
|
||||
@@ -46,6 +46,8 @@
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <stm32.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
@@ -194,10 +196,8 @@
|
||||
|
||||
/* High-resolution timer
|
||||
*/
|
||||
#ifdef CONFIG_HRT_TIMER
|
||||
# define HRT_TIMER 8 /* use timer8 for the HRT */
|
||||
# define HRT_TIMER_CHANNEL 1 /* use capture/compare channel */
|
||||
#endif
|
||||
#define HRT_TIMER 8 /* use timer8 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel */
|
||||
|
||||
/* Alternate function pin selections ************************************************/
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
include ${TOPDIR}/.config
|
||||
|
||||
include $(TOPDIR)/configs/px4fmu-v2/common/Make.defs
|
||||
File diff suppressed because it is too large
Load Diff
@@ -75,8 +75,8 @@ CONFIG_ARCH_ARM=y
|
||||
CONFIG_ARCH_CORTEXM4=y
|
||||
CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_BOARD="px4fmuv2"
|
||||
CONFIG_ARCH_BOARD_PX4FMUV2=y
|
||||
CONFIG_ARCH_BOARD="px4fmu-v2"
|
||||
CONFIG_ARCH_BOARD_PX4FMU_V2=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_DRAM_SIZE=0x00040000
|
||||
CONFIG_DRAM_START=0x20000000
|
||||
@@ -297,22 +297,6 @@ CONFIG_USART6_RXDMA=y
|
||||
CONFIG_UART7_RXDMA=n
|
||||
CONFIG_UART8_RXDMA=n
|
||||
|
||||
#
|
||||
# PX4FMU specific driver settings
|
||||
#
|
||||
# CONFIG_HRT_TIMER
|
||||
# Enables the high-resolution timer. The board definition must
|
||||
# set HRT_TIMER and HRT_TIMER_CHANNEL to the timer and capture/
|
||||
# compare channels to be used.
|
||||
# CONFIG_HRT_PPM
|
||||
# Enables R/C PPM input using the HRT. The board definition must
|
||||
# set HRT_PPM_CHANNEL to the timer capture/compare channel to be
|
||||
# used, and define GPIO_PPM_IN to configure the appropriate timer
|
||||
# GPIO.
|
||||
#
|
||||
CONFIG_HRT_TIMER=y
|
||||
CONFIG_HRT_PPM=n
|
||||
|
||||
#
|
||||
# STM32F40xxx specific SPI device driver settings
|
||||
#
|
||||
@@ -45,11 +45,8 @@
|
||||
#include <nuttx/config.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
#include <stm32_rcc.h>
|
||||
#include <stm32_sdio.h>
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
@@ -118,10 +115,8 @@
|
||||
/*
|
||||
* High-resolution timer
|
||||
*/
|
||||
#ifdef CONFIG_HRT_TIMER
|
||||
# define HRT_TIMER 1 /* use timer1 for the HRT */
|
||||
# define HRT_TIMER_CHANNEL 2 /* use capture/compare channel 2 */
|
||||
#endif
|
||||
#define HRT_TIMER 1 /* use timer1 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 2 /* use capture/compare channel 2 */
|
||||
|
||||
/*
|
||||
* PPM
|
||||
@@ -130,10 +125,8 @@
|
||||
*
|
||||
* Pin is PA8, timer 1, channel 1
|
||||
*/
|
||||
#if defined(CONFIG_HRT_TIMER) && defined (CONFIG_HRT_PPM)
|
||||
# define HRT_PPM_CHANNEL 1 /* use capture/compare channel 1 */
|
||||
# define GPIO_PPM_IN GPIO_TIM1_CH1IN
|
||||
#endif
|
||||
#define HRT_PPM_CHANNEL 1 /* use capture/compare channel 1 */
|
||||
#define GPIO_PPM_IN GPIO_TIM1_CH1IN
|
||||
|
||||
/* LED definitions ******************************************************************/
|
||||
/* PX4 has two LEDs that we will encode as: */
|
||||
@@ -0,0 +1,3 @@
|
||||
include ${TOPDIR}/.config
|
||||
|
||||
include $(TOPDIR)/configs/px4io-v2/common/Make.defs
|
||||
@@ -74,8 +74,8 @@ CONFIG_ARCH_ARM=y
|
||||
CONFIG_ARCH_CORTEXM3=y
|
||||
CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32F100C8=y
|
||||
CONFIG_ARCH_BOARD="px4iov2"
|
||||
CONFIG_ARCH_BOARD_PX4IOV2=y
|
||||
CONFIG_ARCH_BOARD="px4io-v2"
|
||||
CONFIG_ARCH_BOARD_PX4IO_V2=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2000
|
||||
CONFIG_DRAM_SIZE=0x00002000
|
||||
CONFIG_DRAM_START=0x20000000
|
||||
@@ -195,28 +195,6 @@ SERIAL_HAVE_CONSOLE_DMA=y
|
||||
CONFIG_USART2_RXDMA=n
|
||||
CONFIG_USART3_RXDMA=y
|
||||
|
||||
#
|
||||
# PX4IO specific driver settings
|
||||
#
|
||||
# CONFIG_HRT_TIMER
|
||||
# Enables the high-resolution timer. The board definition must
|
||||
# set HRT_TIMER and HRT_TIMER_CHANNEL to the timer and capture/
|
||||
# compare channels to be used.
|
||||
# CONFIG_HRT_PPM
|
||||
# Enables R/C PPM input using the HRT. The board definition must
|
||||
# set HRT_PPM_CHANNEL to the timer capture/compare channel to be
|
||||
# used, and define GPIO_PPM_IN to configure the appropriate timer
|
||||
# GPIO.
|
||||
# CONFIG_PWM_SERVO
|
||||
# Enables the PWM servo driver. The driver configuration must be
|
||||
# supplied by the board support at initialisation time.
|
||||
# Note that USART2 must be disabled on the PX4 board for this to
|
||||
# be available.
|
||||
#
|
||||
#
|
||||
CONFIG_HRT_TIMER=y
|
||||
CONFIG_HRT_PPM=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
@@ -75,7 +75,7 @@ CONFIG_ARCH_CORTEXM3=y
|
||||
CONFIG_ARCH_CHIP=stm32
|
||||
CONFIG_ARCH_CHIP_STM32F100C8=y
|
||||
CONFIG_ARCH_BOARD=px4iov2
|
||||
CONFIG_ARCH_BOARD_PX4IOV2=y
|
||||
CONFIG_ARCH_BOARD_PX4IO_V2=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=24000
|
||||
CONFIG_DRAM_SIZE=0x00002000
|
||||
CONFIG_DRAM_START=0x20000000
|
||||
@@ -187,29 +187,6 @@ CONFIG_USART1_2STOP=0
|
||||
CONFIG_USART2_2STOP=0
|
||||
CONFIG_USART3_2STOP=0
|
||||
|
||||
#
|
||||
# PX4IO specific driver settings
|
||||
#
|
||||
# CONFIG_HRT_TIMER
|
||||
# Enables the high-resolution timer. The board definition must
|
||||
# set HRT_TIMER and HRT_TIMER_CHANNEL to the timer and capture/
|
||||
# compare channels to be used.
|
||||
# CONFIG_HRT_PPM
|
||||
# Enables R/C PPM input using the HRT. The board definition must
|
||||
# set HRT_PPM_CHANNEL to the timer capture/compare channel to be
|
||||
# used, and define GPIO_PPM_IN to configure the appropriate timer
|
||||
# GPIO.
|
||||
# CONFIG_PWM_SERVO
|
||||
# Enables the PWM servo driver. The driver configuration must be
|
||||
# supplied by the board support at initialisation time.
|
||||
# Note that USART2 must be disabled on the PX4 board for this to
|
||||
# be available.
|
||||
#
|
||||
#
|
||||
CONFIG_HRT_TIMER=y
|
||||
CONFIG_HRT_PPM=y
|
||||
CONFIG_PWM_SERVO=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
@@ -1,3 +0,0 @@
|
||||
include ${TOPDIR}/.config
|
||||
|
||||
include $(TOPDIR)/configs/px4fmuv2/common/Make.defs
|
||||
@@ -1,3 +0,0 @@
|
||||
include ${TOPDIR}/.config
|
||||
|
||||
include $(TOPDIR)/configs/px4io/common/Make.defs
|
||||
@@ -59,9 +59,9 @@
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/analog/adc.h>
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include <stm32.h>
|
||||
#include "px4fmu_internal.h"
|
||||
#include "stm32_uart.h"
|
||||
#include <stm32_uart.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* these headers are not C++ safe */
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
#include <nuttx/spi.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "chip.h"
|
||||
#include "stm32_internal.h"
|
||||
#include <up_arch.h>
|
||||
#include <chip.h>
|
||||
#include <stm32.h>
|
||||
#include "px4fmu_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "stm32_internal.h"
|
||||
#include <up_arch.h>
|
||||
#include <stm32.h>
|
||||
#include "px4fmu_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "stm32_internal.h"
|
||||
#include <stm32.h>
|
||||
#include "px4iov2_internal.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
/* these headers are not C++ safe */
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <arch/board/board.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include <stm32_internal.h>
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
|
||||
+9
-31
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
|
||||
/*
|
||||
* PX4FMU GPIO numbers.
|
||||
*
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMUV2
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
|
||||
/*
|
||||
* PX4FMUv2 GPIO numbers.
|
||||
*
|
||||
@@ -93,36 +93,14 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4IO
|
||||
/*
|
||||
* PX4IO GPIO numbers.
|
||||
*
|
||||
* XXX note that these are here for reference/future use; currently
|
||||
* there is no good way to wire these up without a common STM32 GPIO
|
||||
* driver, which isn't implemented yet.
|
||||
*/
|
||||
/* outputs */
|
||||
# define GPIO_ACC1_POWER (1<<0) /**< accessory power 1 */
|
||||
# define GPIO_ACC2_POWER (1<<1) /**< accessory power 2 */
|
||||
# define GPIO_SERVO_POWER (1<<2) /**< servo power */
|
||||
# define GPIO_RELAY1 (1<<3) /**< relay 1 */
|
||||
# define GPIO_RELAY2 (1<<4) /**< relay 2 */
|
||||
# define GPIO_LED_BLUE (1<<5) /**< blue LED */
|
||||
# define GPIO_LED_AMBER (1<<6) /**< amber/red LED */
|
||||
# define GPIO_LED_SAFETY (1<<7) /**< safety LED */
|
||||
|
||||
/* inputs */
|
||||
# define GPIO_ACC_OVERCURRENT (1<<8) /**< accessory 1/2 overcurrent detect */
|
||||
# define GPIO_SERVO_OVERCURRENT (1<<9) /**< servo overcurrent detect */
|
||||
# define GPIO_SAFETY_BUTTON (1<<10) /**< safety button pressed */
|
||||
|
||||
/**
|
||||
* Default GPIO device - other devices may also support this protocol if
|
||||
* they also export GPIO-like things. This is always the GPIOs on the
|
||||
* main board.
|
||||
*/
|
||||
# define GPIO_DEVICE_PATH "/dev/px4io"
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
|
||||
/* no GPIO driver on the PX4IOv1 board */
|
||||
# define GPIO_DEVICE_PATH "/nonexistent"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4IO_V2
|
||||
/* no GPIO driver on the PX4IOv2 board */
|
||||
# define GPIO_DEVICE_PATH "/nonexistent"
|
||||
#endif
|
||||
|
||||
#ifndef GPIO_DEVICE_PATH
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user