From f1a8fd9a572fd43916af8dd9c21d3217e32d40c2 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:37:10 -0500 Subject: [PATCH] [target] FOXEERF722V4 ICM42668P --- src/main/target/FOXEERF722DUAL/FOXEERF722V4.mk | 0 src/main/target/FOXEERF722DUAL/target.h | 13 +++++++++++++ src/main/target/FOXEERF722DUAL/target.mk | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 src/main/target/FOXEERF722DUAL/FOXEERF722V4.mk diff --git a/src/main/target/FOXEERF722DUAL/FOXEERF722V4.mk b/src/main/target/FOXEERF722DUAL/FOXEERF722V4.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/main/target/FOXEERF722DUAL/target.h b/src/main/target/FOXEERF722DUAL/target.h index e485da2bff..0c71e61184 100644 --- a/src/main/target/FOXEERF722DUAL/target.h +++ b/src/main/target/FOXEERF722DUAL/target.h @@ -23,7 +23,11 @@ #define TARGET_BOARD_IDENTIFIER "FXF7" #if defined (FOXEERF722V2) #define USBD_PRODUCT_STRING "FOXEERF722V2" +#elif defined (FOXEERF722V4) +#define USBD_PRODUCT_STRING "FOXEERF722V4" +#endif +#if ( defined(FOXEERF722V2) || defined(FOXEERF722V4) ) #define USE_GYRO #define USE_ACC #define USE_EXTI @@ -35,6 +39,15 @@ #define MPU6000_SPI_INSTANCE SPI1 #define GYRO_MPU6000_ALIGN CW270_DEG #define ACC_MPU6000_ALIGN CW270_DEG +#if defined(FOXEERF722V4) +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ACC_ICM42688P_ALIGN CW270_DEG +#endif + #else #define USBD_PRODUCT_STRING "FOXEERF722DUAL" diff --git a/src/main/target/FOXEERF722DUAL/target.mk b/src/main/target/FOXEERF722DUAL/target.mk index 287bef98e5..37475031b0 100644 --- a/src/main/target/FOXEERF722DUAL/target.mk +++ b/src/main/target/FOXEERF722DUAL/target.mk @@ -12,6 +12,12 @@ TARGET_SRC += \ drivers/accgyro/accgyro_mpu.c \ drivers/accgyro/accgyro_spi_mpu6000.c \ +else ifeq ($(TARGET), FOXEERF722V4) +TARGET_SRC += \ +drivers/accgyro/accgyro_mpu.c \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ + else TARGET_SRC += \ drivers/accgyro/accgyro_mpu6500.c \