Create release.yml
[betaflight.git] / src / main / target / IFLIGHT_H743_AIO_V2 / target.h
blob7fe8769c0bb819f6df3575b05c138959a7d94c45
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "IF7A"
24 #define USBD_PRODUCT_STRING "IFLIGHT_H743_AIO_V2"
26 #define LED0_PIN PC13
28 #define USE_BEEPER
29 #define BEEPER_PIN PD2
30 #define BEEPER_INVERTED
32 #define USE_UART
34 #define USE_UART1
35 #define UART1_RX_PIN PA10
36 #define UART1_TX_PIN PA9
38 #define USE_UART2
39 #define UART2_RX_PIN PA3
40 #define UART2_TX_PIN PA2
42 #define USE_UART3
43 #define UART3_RX_PIN PB11
44 #define UART3_TX_PIN PB10
46 #define USE_UART4
47 #define UART4_RX_PIN PA1
48 #define UART4_TX_PIN PA0
50 #define USE_UART6
51 #define UART6_RX_PIN PC7
52 #define UART6_TX_PIN PC6
54 #define USE_UART7
55 #define UART7_RX_PIN PE7
56 #define UART7_TX_PIN PE8
58 #define USE_UART8
59 #define UART8_RX_PIN PE0
60 #define UART8_TX_PIN PE1
62 #define USE_VCP
64 #define SERIAL_PORT_COUNT 8
66 #define USE_SPI
68 #define USE_SPI_DEVICE_1
69 #define SPI1_SCK_PIN PA5
70 #define SPI1_MISO_PIN PA6
71 #define SPI1_MOSI_PIN PA7
72 #define SPI1_NSS_PIN PA4
74 #define USE_SPI_DEVICE_2
75 #define SPI2_SCK_PIN PB13
76 #define SPI2_MISO_PIN PB14
77 #define SPI2_MOSI_PIN PB15
78 #define SPI2_NSS_PIN PB12
80 #define USE_SPI_DEVICE_3
81 #define SPI3_SCK_PIN PC10
82 #define SPI3_MISO_PIN PC11
83 #define SPI3_MOSI_PIN PC12
84 #define SPI3_NSS_PIN PA15
86 #define USE_SPI_DEVICE_4
87 #define SPI4_SCK_PIN PE2
88 #define SPI4_MISO_PIN PE5
89 #define SPI4_MOSI_PIN PE6
90 #define SPI4_NSS_PIN PE4
92 #define USE_I2C
93 #define USE_I2C_DEVICE_1
94 #define I2C_DEVICE_1 (I2CDEV_1)
95 #define I2C1_SCL PB8
96 #define I2C1_SDA PB9
98 #define USE_I2C_DEVICE_2
99 #define I2C_DEVICE_2 (I2CDEV_2)
100 #define I2C2_SCL PB10
101 #define I2C2_SDA PB11
103 #define MAG_I2C_INSTANCE (I2CDEV_1)
104 #define USE_MAG
105 #define USE_MAG_HMC5883
106 #define USE_MAG_QMC5883
107 #define USE_MAG_LIS3MDL
109 #define BARO_I2C_INSTANCE (I2CDEV_1)
110 #define USE_BARO
111 #define DEFAULT_BARO_DPS310I2CDEV_1
112 #define USE_BARO_MS5611
113 #define USE_BARO_BMP280
114 #define USE_BARO_DPS310
116 #define USE_GYRO
117 #define USE_ACC
118 #define USE_GYRO_SPI_MPU6000
119 #define USE_ACC_SPI_MPU6000
120 #define USE_ACCGYRO_BMI270
121 #define USE_ACCGYRO_LSM6DSO
123 #define USE_EXTI
124 #define USE_GYRO_EXTI
125 #define GYRO_1_EXTI_PIN PD0
126 #define GYRO_2_EXTI_PIN PD8
127 #define USE_MPU_DATA_READY_SIGNAL
128 #define ENSURE_MPU_DATA_READY_IS_LOW
130 #define GYRO_1_CS_PIN SPI1_NSS_PIN
131 #define GYRO_1_SPI_INSTANCE SPI1
132 #define GYRO_1_ALIGN CW0_DEG
134 #define GYRO_2_CS_PIN SPI2_NSS_PIN
135 #define GYRO_2_SPI_INSTANCE SPI2
136 #define GYRO_2_ALIGN CW0_DEG
138 #define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH
140 #define USE_FLASHFS
141 #define USE_FLASH_TOOLS
142 #define USE_FLASH_M25P16
143 #define USE_FLASH_W25N01G // 1Gb NAND flash support
144 #define USE_FLASH_W25M // Stacked die support
145 #define USE_FLASH_W25M512 // 512Kb (256Kb x 2 stacked) NOR flash support
146 #define USE_FLASH_W25M02G // 2Gb (1Gb x 2 stacked) NAND flash support
147 #define FLASH_CS_PIN SPI3_NSS_PIN
148 #define FLASH_SPI_INSTANCE SPI3
149 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
151 #define USE_MAX7456
152 #define MAX7456_SPI_INSTANCE SPI4
153 #define MAX7456_SPI_CS_PIN SPI4_NSS_PIN
155 #ifdef USE_DMA_SPEC
156 // #define UART1_TX_DMA_OPT 0
157 // #define UART2_TX_DMA_OPT 1
158 // #define UART3_TX_DMA_OPT 2
159 // #define UART4_TX_DMA_OPT 3
160 // #define UART5_TX_DMA_OPT 4
161 // #define UART6_TX_DMA_OPT 5
162 // #define UART7_TX_DMA_OPT 6
163 // #define UART8_TX_DMA_OPT 7
164 #define ADC1_DMA_OPT 8
165 #define ADC3_DMA_OPT 9
166 #else
167 #define ADC1_DMA_STREAM DMA2_Stream0
168 #define ADC3_DMA_STREAM DMA2_Stream1
169 #endif
171 #define USE_ADC
172 #define USE_ADC_INTERNAL
174 #define RSSI_ADC_PIN PC5
175 #define VBAT_ADC_PIN PC3
176 #define CURRENT_METER_ADC_PIN PC2
177 #define EXTERNAL1_ADC_PIN PC1
179 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
180 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
182 #define CURRENT_METER_SCALE_DEFAULT 100
184 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
185 #define DEFAULT_FEATURES (FEATURE_RSSI_ADC | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP)
187 #define TARGET_IO_PORTA 0xffff
188 #define TARGET_IO_PORTB 0xffff
189 #define TARGET_IO_PORTC 0xffff
190 #define TARGET_IO_PORTD 0xffff
191 #define TARGET_IO_PORTE 0xffff
192 #define TARGET_IO_PORTF 0xffff
193 #define TARGET_IO_PORTG 0xffff
195 #define USABLE_TIMER_CHANNEL_COUNT 16
197 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) )