Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / GEPRC_F722_AIO / target.h
blobf7ed46bd4660cf6d1357aacf1e9f98fbeb77fe60
1 /*
2 * This file is part of INAV Project.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "GEPR"
22 #define USBD_PRODUCT_STRING "GEPRC_F722_AIO"
24 #define LED0 PC4
26 #define BEEPER PC15
27 #define BEEPER_INVERTED
29 // *************** Gyro & ACC **********************
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW90_DEG
41 #define MPU6000_CS_PIN PA15
42 #define MPU6000_SPI_BUS BUS_SPI1
44 #define USE_IMU_BMI270
45 #define IMU_BMI270_ALIGN CW90_DEG
46 #define BMI270_CS_PIN PA15
47 #define BMI270_SPI_BUS BUS_SPI1
49 #define USE_IMU_ICM42605
50 #define IMU_ICM42605_ALIGN CW90_DEG
51 #define ICM42605_CS_PIN PA15
52 #define ICM42605_SPI_BUS BUS_SPI1
54 // *************** I2C/Baro/Mag *********************
55 #define USE_I2C
56 #define USE_I2C_DEVICE_2
57 #define I2C2_SCL PB10
58 #define I2C2_SDA PB11
60 #define USE_BARO
61 #define BARO_I2C_BUS BUS_I2C2
62 #define USE_BARO_BMP280
63 #define USE_BARO_DPS310
64 #define USE_BARO_MS5611
66 #define USE_MAG
67 #define MAG_I2C_BUS BUS_I2C2
68 #define USE_MAG_ALL
70 #define TEMPERATURE_I2C_BUS BUS_I2C2
72 #define PITOT_I2C_BUS BUS_I2C2
74 #define USE_RANGEFINDER
75 #define RANGEFINDER_I2C_BUS BUS_I2C2
76 #define BNO055_I2C_BUS BUS_I2C2
78 // *************** FLASH **************************
79 #define M25P16_CS_PIN PB9
80 #define M25P16_SPI_BUS BUS_SPI3
81 #define USE_FLASHFS
82 #define USE_FLASH_M25P16
83 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
85 #define USE_SPI_DEVICE_3
86 #define SPI3_SCK_PIN PB3
87 #define SPI3_MISO_PIN PB4
88 #define SPI3_MOSI_PIN PB5
90 // *************** OSD *****************************
91 #define USE_SPI_DEVICE_2
92 #define SPI2_SCK_PIN PB13
93 #define SPI2_MISO_PIN PB14
94 #define SPI2_MOSI_PIN PB15
96 #define USE_MAX7456
97 #define MAX7456_SPI_BUS BUS_SPI2
98 #define MAX7456_CS_PIN PB12
100 // *************** UART *****************************
101 #define USE_VCP
103 #define USE_UART1
104 #define UART1_RX_PIN PA10
105 #define UART1_TX_PIN PA9
107 #define USE_UART2
108 #define UART2_RX_PIN PA3
109 #define UART2_TX_PIN PA2
111 #define USE_UART4
112 #define UART4_RX_PIN PC11
113 #define UART4_TX_PIN PC10
115 #define USE_UART5
116 #define UART5_RX_PIN PD2
117 #define UART5_TX_PIN PC12
119 #define SERIAL_PORT_COUNT 5
121 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
122 #define SERIALRX_PROVIDER SERIALRX_SBUS
123 #define SERIALRX_UART SERIAL_PORT_USART2
125 // *************** ADC *****************************
126 #define USE_ADC
127 #define ADC_INSTANCE ADC1
128 #define ADC1_DMA_STREAM DMA2_Stream0
129 #define ADC_CHANNEL_1_PIN PC2
130 #define ADC_CHANNEL_2_PIN PC1
132 #define VBAT_ADC_CHANNEL ADC_CHN_1
133 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
136 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
140 // *************** LEDSTRIP ************************
141 #define USE_LED_STRIP
142 #define WS2811_PIN PA1
146 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
148 #define TARGET_IO_PORTA 0xffff
149 #define TARGET_IO_PORTB 0xffff
150 #define TARGET_IO_PORTC 0xffff
151 #define TARGET_IO_PORTD (BIT(2))
153 #define MAX_PWM_OUTPUT_PORTS 8
155 #define USE_DSHOT
156 #define USE_ESC_SENSOR