From 957c4d8f971167f685dd43206a75f6a02466a23c Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:04:14 -0600 Subject: [PATCH] [target] IFRC_IFLIGHT_SUCCEX_E_F7 add BMI270 and ICM20689 --- .../target/IFRC_IFLIGHT_SUCCEX_E_F7/target.c | 2 +- .../target/IFRC_IFLIGHT_SUCCEX_E_F7/target.h | 19 ++++++++++++++-- .../target/IFRC_IFLIGHT_SUCCEX_E_F7/target.mk | 22 ++++++++++--------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.c b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.c index f6780a1a41..b8641b75c6 100644 --- a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.c +++ b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.c @@ -28,7 +28,7 @@ #include "drivers/dma.h" const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { - DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), //cam DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM diff --git a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.h b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.h index 372fc9d935..80fa7fbab1 100644 --- a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.h +++ b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.h @@ -51,14 +51,29 @@ #define MPU6000_CS_PIN PA15 #define USE_GYRO -#define USE_GYRO_SPI_MPU6000 - #define USE_ACC + #define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 #define ACC_MPU6000_ALIGN CW180_DEG #define GYRO_MPU6000_ALIGN CW180_DEG +#define USE_GYRO_SPI_ICM20689 +#define USE_ACC_SPI_ICM20689 +#define ACC_ICM20689_ALIGN CW180_DEG +#define GYRO_ICM20689_ALIGN CW180_DEG +#define ICM20689_CS_PIN PA15 +#define ICM20689_SPI_INSTANCE SPI1 + +#define USE_SPI_GYRO +#define USE_GYRO_EXTI +#define USE_ACCGYRO_BMI270 +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_INSTANCE SPI1 + #define USE_VCP #define USE_UART1 #define USE_UART2 diff --git a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.mk b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.mk index b2c6c71023..d6804d7af7 100644 --- a/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.mk +++ b/src/main/target/IFRC_IFLIGHT_SUCCEX_E_F7/target.mk @@ -2,13 +2,15 @@ F7X2RE_TARGETS += $(TARGET) FEATURES = VCP ONBOARDFLASH TARGET_SRC = \ - drivers/accgyro/accgyro_mpu.c \ - drivers/accgyro/accgyro_spi_mpu6000.c \ - drivers/barometer/barometer_bmp280.c \ - drivers/barometer/barometer_bmp085.c\ - drivers/barometer/barometer_ms5611.c\ - drivers/compass/compass_hmc5883l.c \ - drivers/compass/compass_qmc5883l.c \ - drivers/light_ws2811strip.c \ - drivers/light_ws2811strip_hal.c \ - drivers/max7456.c + drivers/accgyro/accgyro_mpu.c \ + drivers/accgyro/accgyro_spi_mpu6000.c \ + drivers/accgyro/accgyro_spi_icm20689.c \ + drivers/accgyro/accgyro_spi_bmi270.c \ + drivers/barometer/barometer_bmp280.c \ + drivers/barometer/barometer_bmp085.c\ + drivers/barometer/barometer_ms5611.c\ + drivers/compass/compass_hmc5883l.c \ + drivers/compass/compass_qmc5883l.c \ + drivers/light_ws2811strip.c \ + drivers/light_ws2811strip_hal.c \ + drivers/max7456.c