From 95120af6e3c27887f5071930e00bd5e1d18c20f0 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 17 Apr 2024 07:36:07 -0500 Subject: [PATCH] [target] TMOTORF7V2 add BMI270, ICM42688P (#1024) --- src/main/target/TMOTORF7V2/target.h | 43 +++++++++++++++++++++------- src/main/target/TMOTORF7V2/target.mk | 18 ++++++------ 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/main/target/TMOTORF7V2/target.h b/src/main/target/TMOTORF7V2/target.h index 4b1a404184..a55dfbeaed 100644 --- a/src/main/target/TMOTORF7V2/target.h +++ b/src/main/target/TMOTORF7V2/target.h @@ -23,9 +23,10 @@ #define USE_TARGET_CONFIG -#define TARGET_BOARD_IDENTIFIER "TMR7" -#define USBD_PRODUCT_STRING "TMOTORF7V2" -#define TARGET_MANUFACTURER_IDENTIFIER "TMTR" +#define BOARD_NAME TMOTORF7V2 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF #define LED0_PIN PC14 @@ -37,20 +38,42 @@ #define ENABLE_DSHOT_DMAR true +#define USE_SPI_GYRO #define USE_EXTI +#define USE_GYRO_EXTI + #define MPU_INT_EXTI PC4 #define USE_MPU_DATA_READY_SIGNAL -#define USE_GYRO -#define USE_GYRO_SPI_MPU6000 -#define MPU6000_CS_PIN PA4 -#define MPU6000_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW0_DEG - #define USE_ACC +#define USE_ACC_SPI_ICM42688P #define USE_ACC_SPI_MPU6000 #define USE_ACC_SPI_MPU6500 -#define ACC_MPU6000_ALIGN CW0_DEG +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 #define USE_BARO #define USE_BARO_BMP280 diff --git a/src/main/target/TMOTORF7V2/target.mk b/src/main/target/TMOTORF7V2/target.mk index 1ad2e0fd8e..ee497211af 100644 --- a/src/main/target/TMOTORF7V2/target.mk +++ b/src/main/target/TMOTORF7V2/target.mk @@ -1,11 +1,13 @@ F7X2RE_TARGETS += $(TARGET) FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ - drivers/accgyro/accgyro_mpu6500.c \ - drivers/accgyro/accgyro_spi_mpu6000.c \ - drivers/accgyro/accgyro_spi_mpu6500.c \ - drivers/barometer/barometer_bmp280.c \ - drivers/compass/compass_hmc5883l.c \ - drivers/compass/compass_qmc5883l.c \ - drivers/max7456.c\ - drivers/light_ws2811strip.c \ + drivers/accgyro/accgyro_mpu6500.c \ + drivers/accgyro/accgyro_spi_mpu6000.c \ + drivers/accgyro/accgyro_spi_mpu6500.c \ + drivers/accgyro/accgyro_spi_icm426xx.c \ + drivers/accgyro/accgyro_spi_bmi270.c \ + drivers/barometer/barometer_bmp280.c \ + drivers/compass/compass_hmc5883l.c \ + drivers/compass/compass_qmc5883l.c \ + drivers/max7456.c\ + drivers/light_ws2811strip.c \