From e4d076bd7adbe73ad6f4ffb88db8c3c1eb456110 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 17 Apr 2024 07:33:09 -0500 Subject: [PATCH] [target] GEPRCF405 add BMI270, ICM42688P; keep mpu6000 as CW270 (questionable) (#1016) --- src/main/target/GEPRCF405/target.h | 28 ++++++++++++++++++++++------ src/main/target/GEPRCF405/target.mk | 4 +++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/main/target/GEPRCF405/target.h b/src/main/target/GEPRCF405/target.h index c4ce6fd344..34ce84070f 100644 --- a/src/main/target/GEPRCF405/target.h +++ b/src/main/target/GEPRCF405/target.h @@ -21,9 +21,10 @@ #define USE_TARGET_CONFIG -#define TARGET_BOARD_IDENTIFIER "GPR4" -#define TARGET_MANUFACTURER_IDENTIFIER "GEPR" -#define USBD_PRODUCT_STRING "GEPRCF405" +#define BOARD_NAME GEPRCF405 +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF #define LED0_PIN PC14 #define LED1_PIN PC15 @@ -32,21 +33,36 @@ #define BEEPER_PIN PC13 #define BEEPER_INVERTED +#define USE_SPI_GYRO #define USE_EXTI +#define USE_GYRO_EXTI + #define MPU_INT_EXTI PC3 #define USE_MPU_DATA_READY_SIGNAL #define USE_ACC #define USE_ACC_SPI_MPU6000 -#define ACC_MPU6000_1_ALIGN CW270_DEG - +#define USE_ACC_SPI_ICM42688P #define USE_GYRO #define USE_GYRO_SPI_MPU6000 -#define GYRO_MPU6000_ALIGN CW270_DEG +#define USE_GYRO_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG #define MPU6000_CS_PIN PA15 #define MPU6000_SPI_INSTANCE SPI3 +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA15 +#define ICM42688P_SPI_INSTANCE SPI3 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_INSTANCE SPI3 + //-------------------------------------SPI2 FLASH------------------------------ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS diff --git a/src/main/target/GEPRCF405/target.mk b/src/main/target/GEPRCF405/target.mk index d195664d8a..7ff7b2b71b 100644 --- a/src/main/target/GEPRCF405/target.mk +++ b/src/main/target/GEPRCF405/target.mk @@ -3,10 +3,12 @@ FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ + drivers/accgyro/accgyro_spi_icm426xx.c \ + drivers/accgyro/accgyro_spi_bmi270.c \ drivers/barometer/barometer_bmp085.c \ drivers/barometer/barometer_bmp280.c \ drivers/barometer/barometer_ms5611.c \ drivers/compass/compass_hmc5883l.c \ drivers/compass/compass_qmc5883l.c \ - drivers/light_ws2811strip.c \ + drivers/light_ws2811strip.c \ drivers/max7456.c