Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[targets] BEEBRAIN_PRO_DSM_US/INTL add BMI160 #1058

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/main/target/BEEBRAIN_PRO/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,20 @@

#pragma once

#define TARGET_BOARD_IDENTIFIER "BBPRO" // BeeBrain Pro
#define MANUFACTURER_ID NEBD
#define USBD_PRODUCT_STRING "BeeBrain PRO"
#define TARGET_BOARD_IDENTIFIER "S411" // generic ID
#define FC_TARGET_MCU STM32F411 // not used in EmuF

#if defined(BEEBRAIN_PRO_DSM_US)
#define BOARD_NAME BEEBRAIN_PRO_DSM_US
#elif defined(BEEBRAIN_PRO_DSM_INTL)
#define BOARD_NAME BEEBRAIN_PRO_DSM_INTL
#elif defined(BEEBRAIN_PRO_FRSKY_US)
#define BOARD_NAME BEEBRAIN_PRO_FRSKY_US
#else
#define BOARD_NAME BEEBRAINPRO
#endif

#define USE_TARGET_CONFIG
#define TARGET_PREINIT
Expand Down Expand Up @@ -73,6 +85,15 @@
#define GYRO_MPU6000_ALIGN CW90_DEG
#define ACC_MPU6000_ALIGN CW90_DEG

#if (defined(BEEBRAIN_PRO_DSM_US) || defined(BEEBRAIN_PRO_DSM_INTL))
#define USE_ACCGYRO_BMI160
#define BMI160_SPI_DIVISOR 16
#define BMI160_INT_EXTI PB0
#define BMI160_CS_PIN PA4
#define BMI160_SPI_INSTANCE SPI3
#define GYRO_BMI160_ALIGN CW0_DEG
#endif

// *************** RX ******************************
#if (defined(BEEBRAIN_PRO_DSM_US) || defined(BEEBRAIN_PRO_DSM_INTL))
#define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048
Expand Down
31 changes: 16 additions & 15 deletions src/main/target/BEEBRAIN_PRO/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,41 @@ F411_TARGETS += $(TARGET)
FEATURES = VCP ONBOARDFLASH

TARGET_SRC = \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu6000.c \
drivers/accgyro/accgyro_spi_bmi160.c \
drivers/barometer/barometer_bmp280.c \
drivers/nbd7456.c \
drivers/vtx_rtc6705_soft_spi.c \
drivers/vtx_rtc6705_soft_spi.c \
drivers/flash_m25p16.c

ifeq ($(TARGET), BEEBRAIN_PRO_FRSKY_INTL)
TARGET_SRC += drivers/rx/rx_cc2500.c \
rx/cc2500_frsky_shared.c \
rx/cc2500_common.c \
rx/cc2500_common.c \
rx/cc2500_frsky_d.c \
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
endif

ifeq ($(TARGET), BEEBRAIN_PRO_FRSKY_US)
TARGET_SRC += drivers/rx/rx_cc2500.c \
rx/cc2500_frsky_shared.c \
rx/cc2500_common.c \
rx/cc2500_common.c \
rx/cc2500_frsky_d.c \
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
endif

ifeq ($(TARGET), BEEBRAIN_PRO)
TARGET_SRC += drivers/rx/rx_cc2500.c \
rx/cc2500_frsky_shared.c \
rx/cc2500_common.c \
rx/cc2500_common.c \
rx/cc2500_frsky_d.c \
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
rx/cc2500_frsky_x.c \
rx/cc2500_redpine.c \
rx/cc2500_sfhss.c
endif
Loading