From 712a8a212c55e5f9482ff0d985cc51b0840e8d05 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 1 Nov 2023 15:41:49 -0500 Subject: [PATCH] [Target] FOXEERF722V4 MPU6000 ICM42688P --- src/main/target/FOXEERF722V4/target.c | 22 ++++++++++++---------- src/main/target/FOXEERF722V4/target.h | 24 +++++++++++++++--------- src/main/target/FOXEERF722V4/target.mk | 3 +++ 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/main/target/FOXEERF722V4/target.c b/src/main/target/FOXEERF722V4/target.c index 7997c4bdf6..a0255f4f3a 100644 --- a/src/main/target/FOXEERF722V4/target.c +++ b/src/main/target/FOXEERF722V4/target.c @@ -19,6 +19,9 @@ * If not, see . */ +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: bc7d9ef + #include #include "platform.h" #include "drivers/io.h" @@ -27,16 +30,15 @@ #include "drivers/timer_def.h" const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { -DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 -DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 -DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 -DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 -DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm -DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // tx6 -DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // rx6 -DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led -DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl }; // notice - this file was programmatically generated and may be incomplete. - diff --git a/src/main/target/FOXEERF722V4/target.h b/src/main/target/FOXEERF722V4/target.h index ccc7e23826..75a5688f2a 100644 --- a/src/main/target/FOXEERF722V4/target.h +++ b/src/main/target/FOXEERF722V4/target.h @@ -19,11 +19,17 @@ * If not, see . */ +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: bc7d9ef + #pragma once -#define TARGET_BOARD_IDENTIFIER "FOXE" +#define TARGET_MANUFACTURER_IDENTIFIER "FOXE" #define USBD_PRODUCT_STRING "FOXEERF722V4" +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID + #define USE_GYRO #define USE_GYRO_SPI_MPU6000 #define USE_ACC @@ -37,10 +43,11 @@ #define USE_MAX7456 #define USE_ADC #define USE_SPI_GYRO +#define USE_BARO #define USE_VCP #define USE_FLASHFS -#define USE_FLASH_M25P16 //works +#define USE_FLASH_M25P16 //works in place of W25Q128FV #define USE_OSD #define USE_LED @@ -71,13 +78,12 @@ #define GYRO_1_EXTI_PIN PC4 #define GYRO_1_SPI_INSTANCE SPI1 #define MPU_INT_EXTI PC4 -// notice - GYRO_1_EXTI_PIN and MPU_INT_EXTI may be used interchangeably; there is no other [gyroModel]_EXTI_PIN at this time. +// notice - GYRO_1_EXTI_PIN and MPU_INT_EXTI may be used interchangeably; there is no other [gyroModel]_EXTI_PIN at this time. (ref: https://github.com/emuflight/EmuFlight/blob/master/src/main/sensors/gyro.c) -#define GYRO_2_ALIGN CW0_DEG -#define USE_EXTI +#define USE_EXTI // notice - REQUIRED when USE_GYRO_EXTI #define USE_GYRO_EXTI -// notice - USE_GYRO_EXTI validity unknown at this time +// notice - USE_GYRO_EXTI validity for BMI270 unknown at this time #define USE_MPU_DATA_READY_SIGNAL @@ -112,7 +118,6 @@ #define RX_PPM_PIN PB7 #define SERIAL_PORT_COUNT 7 -#define MAG_I2C_INSTANCE (I2CDEV_1) #define USE_I2C #define USE_I2C_DEVICE_1 #define I2C_DEVICE (I2CDEV_1) @@ -121,8 +126,8 @@ #define I2C1_SCL PB8 #define I2C1_SDA PB9 -#define FLASH_CS_PIN PB12 -#define FLASH_SPI_INSTANCE SPI2 +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define MAX7456_SPI_CS_PIN PC3 @@ -142,6 +147,7 @@ #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL diff --git a/src/main/target/FOXEERF722V4/target.mk b/src/main/target/FOXEERF722V4/target.mk index a799a3b8ed..4cac437e26 100644 --- a/src/main/target/FOXEERF722V4/target.mk +++ b/src/main/target/FOXEERF722V4/target.mk @@ -11,3 +11,6 @@ drivers/max7456.c \ # notice - this file was programmatically generated and may be incomplete. # eg: flash, compass, barometer, vtx6705, ledstrip, pinio, etc. especially mag/baro + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: bc7d9ef