Skip to content

Commit

Permalink
Merge pull request iNavFlight#9272 from iNavFlight/dzikuvx-spdb-f7-mi…
Browse files Browse the repository at this point in the history
…ni-2

SpeedyBee F7 Mini V2 target
  • Loading branch information
DzikuVx authored Sep 5, 2023
2 parents 4b536f2 + d0a4bd2 commit 7b3a50c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/target/SPEEDYBEEF7MINI/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target_stm32f722xe(SPEEDYBEEF7MINI)
target_stm32f722xe(SPEEDYBEEF7MINIV2)
4 changes: 4 additions & 0 deletions src/main/target/SPEEDYBEEF7MINI/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
#include "drivers/pinio.h"
#include "drivers/sensor.h"

#ifdef SPEEDYBEEF7MINIV2
BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);
#else
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6000_ALIGN);
#endif

timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S1 UP1-2 D(1, 4, 5)
Expand Down
16 changes: 16 additions & 0 deletions src/main/target/SPEEDYBEEF7MINI/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
#pragma once

#define TARGET_BOARD_IDENTIFIER "SBMN"

#ifdef SPEEDYBEEF7MINIV2
#define USBD_PRODUCT_STRING "SPEEDYBEEF7MINIV2"
#else
#define USBD_PRODUCT_STRING "SPEEDYBEEF7MINI"
#endif

#define LED0 PA14 //Blue SWCLK

Expand All @@ -35,11 +40,22 @@
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7

#ifdef SPEEDYBEEF7MINIV2

#define USE_IMU_BMI270
#define IMU_BMI270_ALIGN CW180_DEG
#define BMI270_CS_PIN PB2
#define BMI270_SPI_BUS BUS_SPI1

#else

#define USE_IMU_MPU6000
#define IMU_MPU6000_ALIGN CW0_DEG
#define MPU6000_CS_PIN PB2
#define MPU6000_SPI_BUS BUS_SPI1

#endif

// *************** I2C /Baro/Mag *********************
#define USE_I2C
#define USE_I2C_DEVICE_1
Expand Down

0 comments on commit 7b3a50c

Please sign in to comment.