Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / IFLIGHT_BLITZ_F7_AIO / target.h
blob69ea37e5357e376608b4399821b1d99c1fb49483
1 /*
2 * This file is part of INAV Project.
4 * INAV Project 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 Project 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 Project. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "IB7A"
22 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_F7_AIO"
24 #define LED0 PD15
26 #define BEEPER PD3
27 #define BEEPER_INVERTED
29 // ******************* SPI *************************
30 #define USE_SPI
32 #define USE_SPI_DEVICE_1
33 #define SPI1_SCK_PIN PA5
34 #define SPI1_MISO_PIN PA6
35 #define SPI1_MOSI_PIN PA7
36 #define SPI1_NSS_PIN PA4
38 #define USE_SPI_DEVICE_2
39 #define SPI2_SCK_PIN PB13
40 #define SPI2_MISO_PIN PB14
41 #define SPI2_MOSI_PIN PB15
43 #define USE_SPI_DEVICE_3
44 #define SPI3_SCK_PIN PC10
45 #define SPI3_SCK_AF GPIO_AF6_SPI3
46 #define SPI3_MISO_PIN PC11
47 #define SPI3_MISO_AF GPIO_AF6_SPI3
48 #define SPI3_MOSI_PIN PD6
49 #define SPI3_MOSI_AF GPIO_AF5_SPI3
50 #define SPI3_NSS_PIN PA15
52 #define USE_SPI_DEVICE_4
53 #define SPI4_SCK_PIN PE2
54 #define SPI4_MISO_PIN PE5
55 #define SPI4_MOSI_PIN PE6
56 #define SPI4_NSS_PIN PE4
59 // *************** Gyro & ACC **********************
61 #define USE_IMU_BMI270
62 #define IMU_BMI270_ALIGN CW0_DEG
63 #define BMI270_SPI_BUS BUS_SPI1
64 #define BMI270_CS_PIN SPI1_NSS_PIN
66 #define USE_IMU_ICM42605
67 #define IMU_ICM42605_ALIGN CW0_DEG
68 #define ICM42605_SPI_BUS BUS_SPI1
69 #define ICM42605_CS_PIN SPI1_NSS_PIN
71 // *************** I2C/Baro/Mag *********************
72 #define USE_I2C
73 #define USE_I2C_DEVICE_1
74 #define I2C1_SCL PB8
75 #define I2C1_SDA PB9
77 #define USE_I2C_DEVICE_4
78 #define I2C2_SCL PD12
79 #define I2C2_SDA PD13
81 #define USE_BARO
82 #define BARO_I2C_BUS BUS_I2C4
83 #define USE_BARO_BMP280
84 #define USE_BARO_DPS310
86 #define USE_MAG
87 #define MAG_I2C_BUS BUS_I2C1
88 #define USE_MAG_ALL
90 #define TEMPERATURE_I2C_BUS BUS_I2C1
91 #define PITOT_I2C_BUS BUS_I2C1
93 // *************** Blackbox **************************
95 #define USE_FLASHFS
96 #define USE_FLASH_M25P16
98 #define M25P16_SPI_BUS BUS_SPI3
99 #define M25P16_CS_PIN SPI3_NSS_PIN
100 //#define M25P16_SPI_SHARED
102 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
104 // *************** OSD *****************************
106 #define USE_MAX7456
107 #define MAX7456_SPI_BUS BUS_SPI4
108 #define MAX7456_CS_PIN SPI4_NSS_PIN
110 // *************** UART *****************************
111 #define USE_VCP
113 #define USE_UART1
114 #define UART1_RX_PIN PA10
115 #define UART1_TX_PIN PA9
117 #define USE_UART2
118 #define UART2_RX_PIN PA3
119 #define UART2_TX_PIN PA2
121 #define USE_UART3
122 #define UART3_RX_PIN PB11
123 #define UART3_TX_PIN PB10
125 #define USE_UART4
126 #define UART4_RX_PIN PA1
127 #define UART4_TX_PIN PA0
129 #define USE_UART5
130 #define UART5_RX_PIN PD2
131 #define UART5_TX_PIN PC12
133 #define USE_UART6
134 #define UART6_RX_PIN PC7
135 #define UART6_TX_PIN PC6
137 #define USE_UART7
138 #define UART7_RX_PIN PE7
139 #define UART7_TX_PIN PE8
141 #define USE_UART8
142 #define UART8_RX_PIN PE0
143 #define UART8_TX_PIN PE1
145 #define SERIAL_PORT_COUNT 9
147 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
148 #define SERIALRX_PROVIDER SERIALRX_CRSF
149 #define SERIALRX_UART SERIAL_PORT_USART3
151 // *************** ADC *****************************
152 #define USE_ADC
153 #define ADC_INSTANCE ADC1
154 #define ADC1_DMA_STREAM DMA2_Stream0
155 #define ADC_CHANNEL_1_PIN PC3
156 #define ADC_CHANNEL_2_PIN PC2
157 #define ADC_CHANNEL_3_PIN PC5
158 #define ADC_CHANNEL_4_PIN PC1
159 #define VBAT_ADC_CHANNEL ADC_CHN_1
160 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
161 #define RSSI_ADC_CHANNEL ADC_CHN_3
162 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
163 #define CURRENT_METER_SCALE 200
165 #define USE_RANGEFINDER
166 #define RANGEFINDER_I2C_BUS BUS_I2C1
168 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX | FEATURE_LED_STRIP )
170 #define USE_LED_STRIP
171 #define WS2811_PIN PC9
173 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
175 #define TARGET_IO_PORTA 0xffff
176 #define TARGET_IO_PORTB 0xffff
177 #define TARGET_IO_PORTC 0xffff
178 #define TARGET_IO_PORTD 0xffff
179 #define TARGET_IO_PORTE 0xffff
180 #define TARGET_IO_PORTF 0xffff
182 #define MAX_PWM_OUTPUT_PORTS 10
183 #define USE_DSHOT
184 #define USE_ESC_SENSOR