From c9f481b0f144b515248a9823a9c1d4869eb49602 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:40:15 -0500 Subject: [PATCH] [target] ALIENFLIGHTNGF7 add MPU9250, update id --- src/main/target/ALIENFLIGHTNGF7/target.h | 24 +++++++++++++++++------ src/main/target/ALIENFLIGHTNGF7/target.mk | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/target/ALIENFLIGHTNGF7/target.h b/src/main/target/ALIENFLIGHTNGF7/target.h index a1aff1ce8e..149f47fef5 100644 --- a/src/main/target/ALIENFLIGHTNGF7/target.h +++ b/src/main/target/ALIENFLIGHTNGF7/target.h @@ -19,14 +19,17 @@ */ #pragma once -#define TARGET_BOARD_IDENTIFIER "AFF7" + #define USE_TARGET_CONFIG +#define BOARD_NAME ALIENFLIGHTNGF7 +#define MANUFACTURER_ID AFNG +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + #define USE_HARDWARE_REVISION_DETECTION #define HW_PIN PC13 -#define USBD_PRODUCT_STRING "AlienFlightNG F7" - #define LED0_PIN PC12 #define LED1_PIN PD2 @@ -41,16 +44,25 @@ #define USE_MPU_DATA_READY_SIGNAL #define ENSURE_MPU_DATA_READY_IS_LOW -#define MPU6500_CS_PIN SPI1_NSS_PIN -#define MPU6500_SPI_INSTANCE SPI1 +// ICM2060x detected by MPU6500 driver #define USE_ACC #define USE_ACC_SPI_MPU6500 -#define ACC_MPU6500_ALIGN CW270_DEG +#define USE_ACC_SPI_MPU9250 #define USE_GYRO #define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_MPU9250 + +#define ACC_MPU6500_ALIGN CW270_DEG #define GYRO_MPU6500_ALIGN CW270_DEG +#define MPU6500_CS_PIN SPI1_NSS_PIN +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_MPU9250_ALIGN CW270_DEG +#define GYRO_MPU9250_ALIGN CW270_DEG +#define MPU9250_CS_PIN PA4 +#define MPU9250_SPI_INSTANCE SPI1 #define USE_MAG #define USE_MAG_HMC5883 diff --git a/src/main/target/ALIENFLIGHTNGF7/target.mk b/src/main/target/ALIENFLIGHTNGF7/target.mk index 2d9d8709bd..0e1e591552 100644 --- a/src/main/target/ALIENFLIGHTNGF7/target.mk +++ b/src/main/target/ALIENFLIGHTNGF7/target.mk @@ -4,6 +4,7 @@ FEATURES += SDCARD VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_mpu6500.c \ drivers/accgyro/accgyro_spi_mpu6500.c \ + drivers/accgyro/accgyro_spi_mpu9250.c \ drivers/barometer/barometer_bmp280.c \ drivers/barometer/barometer_ms5611.c \ drivers/compass/compass_ak8963.c \