Set blackbox file handler to NULL after closing file
[inav.git] / src / main / target / IFLIGHT_BLITZ_F722 / target.h
blobcea6b4422acd5514550c9fd5b0d223e64f6060bc
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 "IFF722"
22 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_F722"
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 CW0_DEG
37 #define BMI270_CS_PIN PA4
38 #define BMI270_SPI_BUS BUS_SPI1
40 #define USE_IMU_MPU6000
41 #define IMU_MPU6000_ALIGN CW0_DEG
42 #define MPU6000_CS_PIN PA4
43 #define MPU6000_SPI_BUS BUS_SPI1
45 #define USE_IMU_ICM42605
46 #define IMU_ICM42605_ALIGN CW0_DEG
47 #define ICM42605_SPI_BUS BUS_SPI1
48 #define ICM42605_CS_PIN PA4
50 // *************** I2C /Baro/Mag *********************
51 #define USE_I2C
52 #define USE_I2C_DEVICE_1
53 #define I2C1_SCL PB8
54 #define I2C1_SDA PB9
56 #define USE_BARO
57 #define BARO_I2C_BUS BUS_I2C1
58 #define USE_BARO_BMP280
59 #define USE_BARO_MS5611
60 #define USE_BARO_DPS310
62 #define USE_MAG
63 #define MAG_I2C_BUS BUS_I2C1
64 #define USE_MAG_ALL
66 #define TEMPERATURE_I2C_BUS BUS_I2C1
68 #define PITOT_I2C_BUS BUS_I2C1
70 #define USE_RANGEFINDER
71 #define RANGEFINDER_I2C_BUS BUS_I2C1
73 // *************** SPI2 OSD***********************
74 #define USE_SPI_DEVICE_2
75 #define SPI2_SCK_PIN PB13
76 #define SPI2_MISO_PIN PB14
77 #define SPI2_MOSI_PIN PB15
79 #define USE_OSD
80 #define USE_MAX7456
81 #define MAX7456_SPI_BUS BUS_SPI2
82 #define MAX7456_CS_PIN PB12
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
91 #define USE_FLASH_M25P16
92 #define M25P16_SPI_BUS BUS_SPI3
93 #define M25P16_CS_PIN PA15
94 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
96 // *************** UART *****************************
97 #define USE_VCP
98 #define USB_DETECT_PIN PB2
99 #define USE_USB_DETECT
101 #define USE_UART1
102 #define UART1_RX_PIN PA10
103 #define UART1_TX_PIN PA9
105 #define USE_UART2
106 #define UART2_RX_PIN PA3
107 #define UART2_TX_PIN PA2
109 #define USE_UART3
110 #define UART3_RX_PIN PC11
111 #define UART3_TX_PIN PC10
113 #define USE_UART4
114 #define UART4_RX_PIN PA1
115 #define UART4_TX_PIN PA0
117 #define USE_UART5
118 #define UART5_RX_PIN PD2
119 #define UART5_TX_PIN PC12
121 #define USE_UART6
122 #define UART6_RX_PIN PC7
123 #define UART6_TX_PIN PC6
125 #define SERIAL_PORT_COUNT 7
127 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
129 // *************** ADC *****************************
130 #define USE_ADC
131 #define ADC_INSTANCE ADC1
132 #define ADC1_DMA_STREAM DMA2_Stream0
134 #define ADC_CHANNEL_1_PIN PC2
135 #define ADC_CHANNEL_2_PIN PC1
137 #define VBAT_ADC_CHANNEL ADC_CHN_1
138 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
140 // *************** LEDSTRIP ************************
141 #define USE_LED_STRIP
142 #define WS2811_PIN PA8
144 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
145 #define CURRENT_METER_SCALE 200
147 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
149 #define TARGET_IO_PORTA 0xffff
150 #define TARGET_IO_PORTB 0xffff
151 #define TARGET_IO_PORTC 0xffff
152 #define TARGET_IO_PORTD 0xffff
154 #define MAX_PWM_OUTPUT_PORTS 10
155 #define USE_OSD
156 #define USE_DSHOT
157 #define USE_SERIALSHOT
158 #define USE_ESC_SENSOR