Update header
[inav.git] / src / main / target / IFLIGHT_BLITZ_F722 / target.h
blob370cea22672a2c4c3eb745281933fdef56442080
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 // *************** I2C /Baro/Mag *********************
46 #define USE_I2C
47 #define USE_I2C_DEVICE_1
48 #define I2C1_SCL PB8
49 #define I2C1_SDA PB9
51 #define USE_BARO
52 #define BARO_I2C_BUS BUS_I2C1
53 #define USE_BARO_BMP280
54 #define USE_BARO_MS5611
55 #define USE_BARO_DPS310
57 #define USE_MAG
58 #define MAG_I2C_BUS BUS_I2C1
59 #define USE_MAG_AK8975
60 #define USE_MAG_HMC5883
61 #define USE_MAG_QMC5883
62 #define USE_MAG_IST8310
63 #define USE_MAG_IST8308
64 #define USE_MAG_MAG3110
65 #define USE_MAG_LIS3MDL
67 #define TEMPERATURE_I2C_BUS BUS_I2C1
69 #define PITOT_I2C_BUS BUS_I2C1
71 #define USE_RANGEFINDER
72 #define RANGEFINDER_I2C_BUS BUS_I2C1
74 // *************** SPI2 OSD***********************
75 #define USE_SPI_DEVICE_2
76 #define SPI2_SCK_PIN PB13
77 #define SPI2_MISO_PIN PB14
78 #define SPI2_MOSI_PIN PB15
80 #define USE_OSD
81 #define USE_MAX7456
82 #define MAX7456_SPI_BUS BUS_SPI2
83 #define MAX7456_CS_PIN PB12
85 // *************** SPI3 Flash ***********************
86 #define USE_SPI_DEVICE_3
87 #define SPI3_SCK_PIN PB3
88 #define SPI3_MISO_PIN PB4
89 #define SPI3_MOSI_PIN PB5
91 #define USE_FLASHFS
92 #define USE_FLASH_M25P16
93 #define M25P16_SPI_BUS BUS_SPI3
94 #define M25P16_CS_PIN PA15
95 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
97 // *************** UART *****************************
98 #define USE_VCP
99 #define USB_DETECT_PIN PB2
100 #define USE_USB_DETECT
102 #define USE_UART1
103 #define UART1_RX_PIN PA10
104 #define UART1_TX_PIN PA9
106 #define USE_UART2
107 #define UART2_RX_PIN PA3
108 #define UART2_TX_PIN PA2
110 #define USE_UART3
111 #define UART3_RX_PIN PC11
112 #define UART3_TX_PIN PC10
114 #define USE_UART4
115 #define UART4_RX_PIN PA1
116 #define UART4_TX_PIN PA0
118 #define USE_UART5
119 #define UART5_RX_PIN PD2
120 #define UART5_TX_PIN PC12
122 #define USE_UART6
123 #define UART6_RX_PIN PC7
124 #define UART6_TX_PIN PC6
126 #define SERIAL_PORT_COUNT 7
128 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
130 // *************** ADC *****************************
131 #define USE_ADC
132 #define ADC_INSTANCE ADC1
133 #define ADC1_DMA_STREAM DMA2_Stream0
135 #define ADC_CHANNEL_1_PIN PC2
136 #define ADC_CHANNEL_2_PIN PC1
138 #define VBAT_ADC_CHANNEL ADC_CHN_1
139 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
141 // *************** LEDSTRIP ************************
142 #define USE_LED_STRIP
143 #define WS2811_PIN PA8
145 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
146 #define CURRENT_METER_SCALE 200
148 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
150 #define TARGET_IO_PORTA 0xffff
151 #define TARGET_IO_PORTB 0xffff
152 #define TARGET_IO_PORTC 0xffff
153 #define TARGET_IO_PORTD 0xffff
155 #define MAX_PWM_OUTPUT_PORTS 10
156 #define USE_OSD
157 #define USE_DSHOT
158 #define USE_SERIALSHOT
159 #define USE_ESC_SENSOR