vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / IFLIGHT_H743_AIO_V2 / target.h
blobc3900376686c1d350cc6feb377113da840cb53ca
1 /*
2 * This file is part of INAV.
4 * INAV 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 * INAV 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 INAV. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define USE_TARGET_CONFIG
22 #define TARGET_BOARD_IDENTIFIER "IF7A"
23 #define USBD_PRODUCT_STRING "IFLIGHT_H743_AIO_V2"
25 #define LED0 PC13
27 #define BEEPER_PIN PD2
28 #define BEEPER_INVERTED
30 // *************** SPI1 Gyro & ACC *******************
32 #define USE_SPI
33 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
37 #define SPI1_NSS_PIN PA4
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW0_DEG
41 #define MPU6000_CS_PIN SPI1_NSS_PIN
42 #define MPU6000_SPI_BUS BUS_SPI1
44 #define USE_IMU_BMI270
45 #define IMU_BMI270_ALIGN CW0_DEG
46 #define BMI270_CS_PIN SPI1_NSS_PIN
47 #define BMI270_SPI_BUS BUS_SPI1
49 // *************** I2C1 Baro/Mag *********************
50 #define USE_I2C
51 #define USE_I2C_DEVICE_1
52 #define I2C1_SCL PB8
53 #define I2C1_SDA PB9
55 //UUART3
56 #define USE_I2C_DEVICE_2
57 #define I2C2_SCL PB10
58 #define I2C2_SDA PB11
61 #define USE_BARO
62 #define BARO_I2C_BUS BUS_I2C1
63 #define USE_BARO_BMP280
64 #define USE_BARO_MS5611
65 #define USE_BARO_DPS310
67 #define USE_MAG
68 #define MAG_I2C_BUS BUS_I2C2
69 #define USE_MAG_ALL
71 #define TEMPERATURE_I2C_BUS BUS_I2C2
72 #define PITOT_I2C_BUS BUS_I2C2
74 #define USE_RANGEFINDER
75 #define RANGEFINDER_I2C_BUS BUS_I2C2
77 // *************** SPI2 ***********************
78 #define USE_SPI_DEVICE_2
79 #define SPI2_SCK_PIN PB13
80 #define SPI2_MISO_PIN PB14
81 #define SPI2_MOSI_PIN PB15
82 #define SPI2_NSS_PIN PB12
84 // *************** SPI3 BLACKBOX *******************
85 #define USE_SPI_DEVICE_3
86 #define SPI3_SCK_PIN PC10
87 #define SPI3_MISO_PIN PC11
88 #define SPI3_MOSI_PIN PC12
89 #define SPI3_NSS_PIN PA15
91 #define USE_FLASHFS
92 #define USE_FLASH_M25P16
93 #define M25P16_SPI_BUS BUS_SPI3
94 #define M25P16_CS_PIN SPI3_NSS_PIN
95 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
97 // *************** SPI4 OSD *******************
98 #define USE_SPI_DEVICE_4
99 #define SPI4_SCK_PIN PE2
100 #define SPI4_MISO_PIN PE5
101 #define SPI4_MOSI_PIN PE6
102 #define SPI4_NSS_PIN PE4
104 #define USE_MAX7456
105 #define MAX7456_SPI_BUS BUS_SPI4
106 #define MAX7456_CS_PIN SPI4_NSS_PIN
108 // *************** UART *****************************
109 #define USE_VCP
111 #define USE_UART1
112 #define UART1_RX_PIN PA10
113 #define UART1_TX_PIN PA9
115 #define USE_UART2
116 #define UART2_RX_PIN PA3
117 #define UART2_TX_PIN PA2
119 #define USE_UART4
120 #define UART4_RX_PIN PA1
121 #define UART4_TX_PIN PA0
123 #define USE_UART6
124 #define UART6_RX_PIN PC7
125 #define UART6_TX_PIN PC6
127 #define USE_UART7
128 #define UART7_RX_PIN PE7
129 #define UART7_TX_PIN PE8
131 #define USE_UART8
132 #define UART8_RX_PIN PE0
133 #define UART8_TX_PIN PE1
135 #define SERIAL_PORT_COUNT 7
137 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
138 #define SERIALRX_PROVIDER SERIALRX_CRSF
139 #define SERIALRX_UART SERIAL_PORT_USART4
141 // *************** ADC *****************************
142 #define USE_ADC
143 #define ADC_INSTANCE ADC3
145 #define ADC_CHANNEL_1_PIN PC3
146 #define ADC_CHANNEL_2_PIN PC2
147 #define ADC_CHANNEL_3_PIN PC5
149 #define VBAT_ADC_CHANNEL ADC_CHN_1
150 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
151 #define RSSI_ADC_CHANNEL ADC_CHN_3
153 // *************** LEDSTRIP ************************
154 #define USE_LED_STRIP
155 #define WS2811_PIN PA8
157 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
158 #define CURRENT_METER_SCALE 100
160 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
162 #define TARGET_IO_PORTA 0xffff
163 #define TARGET_IO_PORTB 0xffff
164 #define TARGET_IO_PORTC 0xffff
165 #define TARGET_IO_PORTD 0xffff
166 #define TARGET_IO_PORTE 0xffff
168 #define MAX_PWM_OUTPUT_PORTS 4
169 #define USE_DSHOT
170 #define USE_ESC_SENSOR