Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / IFLIGHT_BLITZ_F722_X1 / target.h
blob03196254420ac01b716eefac17f93c9cf2a41c52
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/>.
19 #pragma once
21 #define TARGET_BOARD_IDENTIFIER "I7X1"
22 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_F722_X1"
24 #define LED0 PC15
25 #define BEEPER PC13
26 #define BEEPER_INVERTED
28 // *************** SPI1 Gyro & ACC *******************
29 #define USE_SPI
30 #define USE_SPI_DEVICE_1
31 #define SPI1_SCK_PIN PA5
32 #define SPI1_MISO_PIN PA6
33 #define SPI1_MOSI_PIN PA7
35 #define USE_IMU_BMI270
36 #define IMU_BMI270_ALIGN CW90_DEG_FLIP
37 #define BMI270_CS_PIN PA4
38 #define BMI270_SPI_BUS BUS_SPI1
40 // ICM42605
41 #define USE_IMU_ICM42605
42 #define IMU_ICM42605_ALIGN CW90_DEG_FLIP
43 #define ICM42605_SPI_BUS BUS_SPI1
44 #define ICM42605_CS_PIN PA4
46 // *************** I2C /Baro/Mag *********************
47 #define USE_I2C
48 #define USE_I2C_DEVICE_1
49 #define I2C1_SCL PB8
50 #define I2C1_SDA PB9
52 #define USE_I2C_DEVICE_2
53 #define I2C2_SCL PB10
54 #define I2C2_SDA PB11
56 #define USE_BARO
57 #define BARO_I2C_BUS BUS_I2C1
58 #define USE_BARO_ALL
60 #define USE_MAG
61 #define MAG_I2C_BUS BUS_I2C2
62 #define USE_MAG_ALL
64 #define TEMPERATURE_I2C_BUS BUS_I2C2
66 #define PITOT_I2C_BUS BUS_I2C2
68 #define RANGEFINDER_I2C_BUS BUS_I2C2
70 // *************** SPI2 OSD***********************
71 #define USE_SPI_DEVICE_2
72 #define SPI2_SCK_PIN PB13
73 #define SPI2_MISO_PIN PB14
74 #define SPI2_MOSI_PIN PB15
76 #define USE_OSD
78 #ifdef IFLIGHT_BLITZ_F722_X1_OSD
79 #define USE_MAX7456
80 #define MAX7456_SPI_BUS BUS_SPI2
81 #define MAX7456_CS_PIN PB12
82 #endif
84 // *************** SPI3 Flash ***********************
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 #define USE_FLASHFS
92 #define USE_FLASH_W25N01G
93 #define W25N01G_SPI_BUS BUS_SPI3
94 #define W25N01G_CS_PIN PA15
96 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
98 // *************** UART *****************************
99 #define USE_VCP
100 #define USB_DETECT_PIN PB2
101 #define USE_USB_DETECT
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_UART3
112 #define UART3_RX_PIN PC11
113 #define UART3_TX_PIN PC10
115 #define USE_UART4
116 #define UART4_RX_PIN PA1
117 #define UART4_TX_PIN PA0
119 #define USE_UART5
120 #define UART5_RX_PIN PD2
121 #define UART5_TX_PIN PC12
123 #define USE_UART6
124 #define UART6_RX_PIN PC7
125 #define UART6_TX_PIN PC6
127 #define SERIAL_PORT_COUNT 7
129 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
130 #define SERIALRX_PROVIDER SERIALRX_CRSF
131 #define SERIALRX_UART SERIAL_PORT_USART2
133 // *************** ADC *****************************
134 #define USE_ADC
135 #define ADC_INSTANCE ADC1
136 #define ADC1_DMA_STREAM DMA2_Stream0
138 #define ADC_CHANNEL_1_PIN PC2
139 #define ADC_CHANNEL_2_PIN PC1
141 #define VBAT_ADC_CHANNEL ADC_CHN_1
142 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
144 // *************** LEDSTRIP ************************
145 #define USE_LED_STRIP
146 #define WS2811_PIN PA8
148 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
149 #define CURRENT_METER_SCALE 200
151 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
153 #define TARGET_IO_PORTA 0xffff
154 #define TARGET_IO_PORTB 0xffff
155 #define TARGET_IO_PORTC 0xffff
156 #define TARGET_IO_PORTD 0xffff
158 #define MAX_PWM_OUTPUT_PORTS 7
159 #define USE_DSHOT
160 #define USE_SERIALSHOT
161 #define USE_ESC_SENSOR
163 #define USE_PINIO
164 #define USE_PINIOBOX
165 #define PINIO1_PIN PC0
166 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
167 #define PINIO2_PIN PC14