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/>.
20 #define TARGET_BOARD_IDENTIFIER "IB7A"
22 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_F7_AIO"
27 #define BEEPER_INVERTED
29 // ******************* 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 *********************
73 #define USE_I2C_DEVICE_1
77 #define USE_I2C_DEVICE_4
82 #define BARO_I2C_BUS BUS_I2C4
83 #define USE_BARO_BMP280
84 #define USE_BARO_DPS310
87 #define MAG_I2C_BUS BUS_I2C1
90 #define TEMPERATURE_I2C_BUS BUS_I2C1
91 #define PITOT_I2C_BUS BUS_I2C1
93 // *************** Blackbox **************************
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 *****************************
107 #define MAX7456_SPI_BUS BUS_SPI4
108 #define MAX7456_CS_PIN SPI4_NSS_PIN
110 // *************** UART *****************************
114 #define UART1_RX_PIN PA10
115 #define UART1_TX_PIN PA9
118 #define UART2_RX_PIN PA3
119 #define UART2_TX_PIN PA2
122 #define UART3_RX_PIN PB11
123 #define UART3_TX_PIN PB10
126 #define UART4_RX_PIN PA1
127 #define UART4_TX_PIN PA0
130 #define UART5_RX_PIN PD2
131 #define UART5_TX_PIN PC12
134 #define UART6_RX_PIN PC7
135 #define UART6_TX_PIN PC6
138 #define UART7_RX_PIN PE7
139 #define UART7_TX_PIN PE8
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 *****************************
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
184 #define USE_ESC_SENSOR