Compare commits

...

1 Commits

Author SHA1 Message Date
Daniel Agar 53cdb802b1 bitcraze crazyflie fixes 2022-05-10 16:59:44 -04:00
131 changed files with 434 additions and 1091 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ pipeline {
"ark_can-rtk-gps_default",
"atl_mantis-edu_default",
"av_x-v1_default",
"bitcraze_crazyflie_default",
"bitcraze_crazyflie2_default",
"bitcraze_crazyflie21_default",
"cuav_can-gps-v1_canbootloader",
"cuav_can-gps-v1_default",
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
ark_cannode,
atl_mantis-edu,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie2,
bitcraze_crazyflie21,
cuav_can-gps-v1,
cuav_nora,
+8 -3
View File
@@ -141,11 +141,16 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: av_x-v1_default
bitcraze_crazyflie_default:
short: bitcraze_crazyflie
bitcraze_crazyflie2_default:
short: bitcraze_crazyflie2
buildType: MinSizeRel
settings:
CONFIG: bitcraze_crazyflie_default
CONFIG: bitcraze_crazyflie2_default
bitcraze_crazyflie21_default:
short: bitcraze_crazyflie21
buildType: MinSizeRel
settings:
CONFIG: bitcraze_crazyflie21_default
cuav_can-gps-v1_default:
short: cuav_can-gps-v1_default
buildType: MinSizeRel
+1 -1
View File
@@ -271,7 +271,7 @@ misc_qgc_extra_firmware: \
check_nxp_fmuk66-v3_default \
check_nxp_fmurt1062-v1_default \
check_mro_x21_default \
check_bitcraze_crazyflie_default \
check_bitcraze_crazyflie2_default \
check_bitcraze_crazyflie21_default \
check_airmind_mindpx-v2_default \
sizes
@@ -20,7 +20,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -18,7 +18,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -20,7 +20,6 @@
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Roman Bapst <roman@auterion.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -18,7 +18,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
@@ -16,7 +16,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -18,7 +18,6 @@
# @output AUX5 Throttle
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -13,7 +13,6 @@
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -18,7 +18,6 @@
# @output AUX4 Gear
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -8,7 +8,6 @@
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -17,7 +17,6 @@
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -18,7 +18,6 @@
# @output AUX5 Throttle
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -16,7 +16,6 @@
# @output AUX3 Motor
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -8,7 +8,6 @@
# @maintainer Sander Smeets <sander@droneslab.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -8,7 +8,6 @@
# @maintainer Sander Smeets <sander@droneslab.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -8,7 +8,6 @@
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -17,7 +17,6 @@
# @output MAIN8 Elevon left
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -74,4 +73,4 @@ then
set PWM_OUT 1234
else
set PWM_OUT 3456
fi
fi
@@ -17,7 +17,6 @@
# @output MAIN8 Pusher reverse channel
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
@@ -17,7 +17,6 @@
# @output MAIN8 motor 4
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -21,7 +21,6 @@
# @output AUX8 Rudder
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -20,7 +20,6 @@
# @output AUX5 Throttle
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -13,7 +13,6 @@
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
@@ -12,7 +12,6 @@
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
@@ -12,7 +12,6 @@
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
@@ -13,7 +13,6 @@
# @maintainer Emmanuel Roussel
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -14,7 +14,6 @@
# @output MAIN5 tail-rotor servo
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -20,7 +20,6 @@
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -15,7 +15,6 @@
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -10,7 +10,6 @@
# @maintainer ThunderFly s.r.o.
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.balloon_defaults
@@ -18,7 +18,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -20,7 +20,6 @@
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -20,7 +20,6 @@
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -21,7 +21,6 @@
# @maintainer Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -22,7 +22,6 @@
# @maintainer Ian McNanie <ianmcnanie@gmail.com>
# @maintainer William Peale <develop707@gmail.com>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
@@ -10,7 +10,6 @@
# @output MAIN4 tail thruster
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.airship_defaults
@@ -15,7 +15,6 @@
#
# @maintainer
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -18,7 +18,6 @@
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -16,7 +16,6 @@
# @maintainer Julian Oes <julian@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -18,7 +18,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -18,7 +18,6 @@
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -16,7 +16,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -8,7 +8,6 @@
# @maintainer James Goppert <james.goppert@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -11,7 +11,6 @@
# @output MAIN4 motor 4
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -11,7 +11,6 @@
# @output MAIN4 motor 4
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
# @maintainer Iain Galloway <iain.galloway@nxp.com>
#
@@ -8,7 +8,6 @@
# @maintainer Farhang Naderi <farhang.nba@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -13,7 +13,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -15,7 +15,6 @@
# @maintainer Blankered
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -18,7 +18,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -7,7 +7,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -17,7 +17,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -10,7 +10,6 @@
# @maintainer Beat Kueng <beat-kueng@gmx.net>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Beat Kueng <beat@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -17,7 +17,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
# @board cuav_x7pro exclude
#
@@ -17,7 +17,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -15,7 +15,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
# @board cuav_x7pro exclude
#
# @maintainer Hyon Lim <lim@uvify.com>
@@ -8,7 +8,6 @@
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -12,7 +12,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -19,7 +19,6 @@
# @maintainer Ricardo Marques <marques.ricardo17@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -8,7 +8,6 @@
# @maintainer Oleg Kalachev <okalachev@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -10,7 +10,6 @@
#
# @maintainer
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_defaults
@@ -13,7 +13,6 @@
# @maintainer Timothy Scott
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_defaults
@@ -15,7 +15,6 @@
# @maintainer Katrin Moritz
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_defaults
@@ -19,7 +19,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
@@ -8,7 +8,6 @@
# @maintainer
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.uuv_defaults
@@ -8,7 +8,6 @@
# @maintainer Daniel Duecker <daniel.duecker@tuhh.de>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.uuv_defaults
@@ -17,7 +17,6 @@
# @maintainer Thies Lennart Alff <thies.lennart.alff@tuhh.de>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.uuv_defaults
@@ -18,7 +18,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -22,7 +22,6 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -18,7 +18,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -20,7 +20,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -20,7 +20,6 @@
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -1,10 +1,10 @@
{
"board_id": 12,
"magic": "Crazyflie",
"magic": "Crazyflie2",
"description": "Firmware for the Crazyflie 2.0",
"image": "",
"build_time": 0,
"summary": "CRAZYFLIE",
"summary": "CRAZYFLIE 2.0",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1032192,
@@ -3,6 +3,9 @@
# board specific defaults
#------------------------------------------------------------------------------
# start CDCACM as soon as possible
sercon
# system_power unavailable
param set-default CBRK_SUPPLY_CHK 894281
@@ -0,0 +1,8 @@
#!/bin/sh
#
# board specific MAVLink startup script.
#------------------------------------------------------------------------------
# Start MAVLink on the USB port
sleep 1
mavlink start -d /dev/ttyACM0
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Bitcraze Crazyflie specific board sensors init
# board specific sensors init
#------------------------------------------------------------------------------
board_adc start
@@ -25,7 +25,7 @@
# CONFIG_STM32_CCMEXCLUDE is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/bitcraze/crazyflie/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/bitcraze/crazyflie2/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
@@ -176,6 +176,7 @@ CONFIG_USART2_RXBUFSIZE=300
CONFIG_USART2_RXDMA=y
CONFIG_USART2_TXBUFSIZE=300
CONFIG_USART3_BAUD=57600
CONFIG_USART3_RXDMA=y
CONFIG_USART3_SERIAL_CONSOLE=y
CONFIG_USART6_BAUD=57600
CONFIG_USART6_RXBUFSIZE=128
@@ -64,7 +64,6 @@ EXTERN(_vectors) /* force the vectors to be included in the output */
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
EXTERN(board_get_manifest)
SECTIONS
{
@@ -34,41 +34,24 @@
/**
* @file board_config.h
*
* PX4-CRAZYFLIE internal definitions
* board internal definitions
*/
#pragma once
/****************************************************************************************************
* Included Files
****************************************************************************************************/
#include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
/****************************************************************************************************
* Definitions
****************************************************************************************************/
/* Configuration ************************************************************************************/
/* Crazyflie GPIOs **********************************************************************************/
/* LEDs */
/* Radio TX indicator */
#define GPIO_LED_RED_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN0)
#define GPIO_LED_RED_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN0)
/* Radio RX indicator */
#define GPIO_LED_GREEN_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN1)
#define GPIO_LED_GREEN_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN2)
#define GPIO_LED_RED_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
#define GPIO_LED_GREEN_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN1)
#define GPIO_LED_GREEN_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN2)
#define GPIO_LED_RED_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
/* PX4: armed state indicator ; Stock FW: Blinking while charging */
#define GPIO_LED_BLUE_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN2)
#define GPIO_LED_BLUE_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN2)
#define BOARD_HAS_CONTROL_STATUS_LEDS 1
#define BOARD_OVERLOAD_LED LED_RED
@@ -81,33 +64,18 @@
#define GPIO_FSYNC_MPU9250 (GPIO_OUTPUT|GPIO_PORTC|GPIO_PIN14) // Needs to be set low
#define GPIO_DRDY_MPU9250 (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13)
#define GPIO_NRF_TXEN (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|GPIO_PORTA|GPIO_PIN4) /* NRF_FLOW_CTRL */
#define GPIO_NRF_TXEN (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|GPIO_PORTA|GPIO_PIN4)
/*
* I2C busses
*/
#define PX4_I2C_BUS_ONBOARD_HZ 400000
#define PX4_I2C_BUS_EXPANSION_HZ 400000
/* I2C busses */
#define PX4_I2C_BUS_MTD 1
#define BOARD_NUMBER_I2C_BUSES 3
#define BOARD_I2C_BUS_CLOCK_INIT {PX4_I2C_BUS_ONBOARD_HZ, 100000, PX4_I2C_BUS_EXPANSION_HZ}
/* Devices on the onboard bus.
*
* Note that these are unshifted addresses.
*/
#define PX4_I2C_OBDEV_MPU9250 0x69
#define BOARD_I2C_BUS_CLOCK_INIT {400000, 400000}
/* USB OTG FS
*
* PA9 OTG_FS_VBUS VBUS sensing
*/
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)
//#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)
/*
* ADC channels
@@ -117,15 +85,13 @@
#define ADC_CHANNELS 0
/* Tone alarm output : These are only applicable when the buzzer deck is attached */
#define TONE_ALARM_TIMER 5 /* timer 5 */
#define TONE_ALARM_CHANNEL 3 /* channel 3 */
#define TONE_ALARM_TIMER 5 /* timer 5 */
#define TONE_ALARM_CHANNEL 3 /* channel 3 */
#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN2)
#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF2|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2)
#define GPIO_TONE_ALARM_NEG (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN3)
/* PWM
*/
/* PWM */
#define DIRECT_PWM_OUTPUT_CHANNELS 4
/* This board overrides the defaults by providing
@@ -159,71 +125,14 @@
__BEGIN_DECLS
/****************************************************************************************************
* Public Types
****************************************************************************************************/
/****************************************************************************************************
* Public data
****************************************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************************************
* Public Functions
****************************************************************************************************/
/****************************************************************************************************
* Name: board_peripheral_reset
*
* Description:
* Called to reset the periferal bus
*
****************************************************************************************************/
#define board_peripheral_reset(ms)
/****************************************************************************************************
* Name: stm32_usbinitialize
*
* Description:
* Called to configure USB IO.
*
****************************************************************************************************/
extern void stm32_usbinitialize(void);
/****************************************************************************
* Name: board_i2c_initialize
*
* Description:
* Called to set I2C bus frequencies.
*
****************************************************************************/
int board_i2c_initialize(void);
/****************************************************************************************************
* Name: stm32_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the PX4FMU board.
*
****************************************************************************************************/
extern void stm32_spiinitialize(void);
/************************************************************************************
* Name: stm32_spi_bus_initialize
*
* Description:
* Called to configure SPI Buses.
*
************************************************************************************/
extern int stm32_spi_bus_initialize(void);
#include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */
@@ -87,14 +87,6 @@ extern void led_on(int led);
extern void led_off(int led);
__END_DECLS
/****************************************************************************
* Protected Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************************************
* Name: stm32_boardinitialize
*
@@ -109,11 +101,9 @@ __EXPORT void
stm32_boardinitialize(void)
{
/* configure LEDs */
board_autoled_initialize();
/* configure SPI interfaces */
stm32_spiinitialize();
stm32_usbinitialize();
@@ -154,7 +144,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
#endif
/* Configure the HW based on the manifest */
px4_platform_configure();
return OK;
@@ -32,15 +32,11 @@
****************************************************************************/
/**
* @file crazyflie_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -55,23 +51,11 @@
#include <stm32.h>
#include "board_config.h"
/************************************************************************************
* Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: stm32_usbinitialize
*
* Description:
* Called to setup USB-related GPIO pins for the PX4-STM32F4Discovery board.
* Called to setup USB-related GPIO pins for the board.
*
************************************************************************************/
@@ -83,10 +67,6 @@ __EXPORT void stm32_usbinitialize(void)
#ifdef CONFIG_STM32_OTGFS
stm32_configgpio(GPIO_OTGFS_VBUS);
/* XXX We only support device mode
stm32_configgpio(GPIO_OTGFS_PWRON);
stm32_configgpio(GPIO_OTGFS_OVER);
*/
#endif
}
@@ -105,4 +85,3 @@ __EXPORT void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
{
uinfo("resume: %d\n", resume);
}

Some files were not shown because too many files have changed in this diff Show More