Skip to content

Commit

Permalink
[targets] BEEBRAIN_PRO_DSM_US/INTL add BMI160 (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter authored May 3, 2024
1 parent 047242b commit 5a78402
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
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

0 comments on commit 5a78402

Please sign in to comment.