From 4f1be377c5831db63943c599f0ad62c5922328fe Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:28:05 -0500 Subject: [PATCH] [target] HGLRCF411 enable dual gyro; add BMI270 ICM42688P --- src/main/target/HGLRCF411/target.h | 30 +++++++++++++++++++++-------- src/main/target/HGLRCF411/target.mk | 2 ++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/main/target/HGLRCF411/target.h b/src/main/target/HGLRCF411/target.h index bae2f2a557..7b97170a1c 100644 --- a/src/main/target/HGLRCF411/target.h +++ b/src/main/target/HGLRCF411/target.h @@ -19,9 +19,11 @@ */ #pragma once -#define TARGET_BOARD_IDENTIFIER "S411" -#define USBD_PRODUCT_STRING "HGLRCF411" -#define TARGET_MANUFACTURER_IDENTIFIER "HGLR" + +#define BOARD_NAME HGLRCF411 +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF #define ENABLE_DSHOT_DMAR true @@ -39,14 +41,26 @@ #define USE_ACC #define USE_ACC_SPI_MPU6000 #define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 + +#define USE_SPI_GYRO #define USE_EXTI +#define USE_GYRO_EXTI #define USE_MPU_DATA_READY_SIGNAL -#define MPU_INT_EXTI PA1 //MPU_INT_EXTI -#define MPU6000_CS_PIN PA4 //GYRO_1_CS_PIN -#define MPU6000_SPI_INSTANCE SPI1 //GYRO_1_SPI_INSTANCE -#define GYRO_MPU6000_ALIGN CW180_DEG -#define ACC_MPU6000_ALIGN CW180_DEG +#define ACC_1_ALIGN CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PA1 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 // OSD #define USE_MAX7456 diff --git a/src/main/target/HGLRCF411/target.mk b/src/main/target/HGLRCF411/target.mk index eb151d2940..dc80441d2f 100644 --- a/src/main/target/HGLRCF411/target.mk +++ b/src/main/target/HGLRCF411/target.mk @@ -4,6 +4,8 @@ FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_mpu.c \ drivers/accgyro/accgyro_spi_mpu6000.c \ + drivers/accgyro/accgyro_spi_icm426xx.c \ + drivers/accgyro/accgyro_spi_bmi270.c \ drivers/compass/compass_hmc5883l.c \ drivers/compass/compass_qmc5883l.c \ drivers/max7456.c