Skip to content

Commit

Permalink
[Target] FOXEERF722V4 MPU6000 ICM42688P
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter committed Nov 1, 2023
1 parent 43fac23 commit 712a8a2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
22 changes: 12 additions & 10 deletions src/main/target/FOXEERF722V4/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* If not, see <http://www.gnu.org/licenses/>.
*/

// This resource file generated using https://github.com/nerdCopter/target-convert
// Commit: bc7d9ef

#include <stdint.h>
#include "platform.h"
#include "drivers/io.h"
Expand All @@ -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.

24 changes: 15 additions & 9 deletions src/main/target/FOXEERF722V4/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@
* If not, see <http://www.gnu.org/licenses/>.
*/

// 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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/main/target/FOXEERF722V4/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 712a8a2

Please sign in to comment.