From 692ce3b4f033ffbf6d7e5c2e284bce654b67099a Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:25:43 -0500 Subject: [PATCH] [target] AIKONF4 add BMI270 (#1003) --- src/main/target/AIKONF4/target.h | 24 ++++++++++++++++++------ src/main/target/AIKONF4/target.mk | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/target/AIKONF4/target.h b/src/main/target/AIKONF4/target.h index 10936665de..0b261909ad 100644 --- a/src/main/target/AIKONF4/target.h +++ b/src/main/target/AIKONF4/target.h @@ -20,8 +20,10 @@ #pragma once -#define TARGET_BOARD_IDENTIFIER "AIK4" -#define USBD_PRODUCT_STRING "AIKONF4" +#define BOARD_NAME AIKONF4 +#define MANUFACTURER_ID AIKO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF #define LED0_PIN PB4 #define USE_BEEPER @@ -38,22 +40,32 @@ #define MPU_INT_EXTI PC4 #define USE_MPU_DATA_READY_SIGNAL -#define MPU6000_CS_PIN SPI1_NSS_PIN -#define MPU6000_SPI_INSTANCE SPI1 #define USE_GYRO #define USE_GYRO_SPI_MPU6000 #define USE_ACC #define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM20602 +#define USE_GYRO_SPI_ICM20602 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6500 + +#define MPU6000_CS_PIN SPI1_NSS_PIN +#define MPU6000_SPI_INSTANCE SPI1 #define GYRO_MPU6000_ALIGN CW0_DEG #define ACC_MPU6000_ALIGN CW0_DEG -#define USE_GYRO_SPI_MPU6500 -#define USE_ACC_SPI_MPU6500 +// ICM2060x detected by MPU6500 driver #define MPU6500_CS_PIN MPU6000_CS_PIN #define MPU6500_SPI_INSTANCE MPU6000_SPI_INSTANCE #define GYRO_MPU6500_ALIGN GYRO_MPU6000_ALIGN #define ACC_MPU6500_ALIGN ACC_MPU6000_ALIGN +#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/AIKONF4/target.mk b/src/main/target/AIKONF4/target.mk index a93456300b..1c19914f81 100644 --- a/src/main/target/AIKONF4/target.mk +++ b/src/main/target/AIKONF4/target.mk @@ -4,5 +4,6 @@ TARGET_SRC = \ drivers/accgyro/accgyro_mpu6500.c \ drivers/accgyro/accgyro_spi_mpu6000.c \ drivers/accgyro/accgyro_spi_mpu6500.c \ + drivers/accgyro/accgyro_spi_bmi270.c \ drivers/barometer/barometer_bmp280.c \ drivers/max7456.c