Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / IFLIGHT_BLITZ_H7_PRO / target.h
blob7d93ec91ce6a57412963ade29f69999e14fb0cee
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 "IB7P"
23 #ifdef IFLIGHT_BLITZ_H7_PRO
24 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_H7_PRO"
25 #else
26 #define USBD_PRODUCT_STRING "IFLIGHT_BLITZ_H7_WING"
27 #endif
29 #define USE_TARGET_CONFIG
31 #define LED0 PE3
32 #define LED1 PE4
34 #define BEEPER PA15
35 #define BEEPER_INVERTED
37 // SPI1
38 #define USE_SPI
39 #define USE_SPI_DEVICE_1
40 #define SPI1_SCK_PIN PA5
41 #define SPI1_MISO_PIN PA6
42 #define SPI1_MOSI_PIN PD7
44 // SPI2
45 #define USE_SPI_DEVICE_2
46 #define SPI2_SCK_PIN PB13
47 #define SPI2_MISO_PIN PB14
48 #define SPI2_MOSI_PIN PB15
50 // SPI3 - not connected
51 #define USE_SPI_DEVICE_3
52 #define SPI3_SCK_PIN PB3
53 #define SPI3_MISO_PIN PB4
54 #define SPI3_MOSI_PIN PB5
56 // SPI4 - GYRO2 not used in INAV
57 #define USE_SPI_DEVICE_4
58 #define SPI4_SCK_PIN PE12
59 #define SPI4_MISO_PIN PE13
60 #define SPI4_MOSI_PIN PE14
62 // ICM42605
63 #define USE_IMU_ICM42605
64 #define IMU_ICM42605_ALIGN CW0_DEG
65 #define ICM42605_SPI_BUS BUS_SPI1
66 #define ICM42605_CS_PIN PC15
68 // OSD
69 #define USE_MAX7456
70 #define MAX7456_SPI_BUS BUS_SPI2
71 #define MAX7456_CS_PIN PB12
73 // I2C
74 #define USE_I2C
75 #define USE_I2C_DEVICE_1
76 #define I2C1_SCL PB6
77 #define I2C1_SDA PB7
79 #define USE_I2C_DEVICE_2
80 #define I2C2_SCL PB10
81 #define I2C2_SDA PB11
83 #define USE_BARO
84 #define BARO_I2C_BUS BUS_I2C2
85 #define USE_BARO_ALL
87 #define USE_MAG
88 #define MAG_I2C_BUS BUS_I2C1
89 #define USE_MAG_ALL
91 #define TEMPERATURE_I2C_BUS BUS_I2C2
92 #define PITOT_I2C_BUS BUS_I2C2
94 #define USE_RANGEFINDER
95 #define RANGEFINDER_I2C_BUS BUS_I2C1
97 // *************** UART *****************************
98 #define USE_VCP
100 #define USE_UART1
101 #define UART1_TX_PIN PA9
102 #define UART1_RX_PIN PA10
104 #define USE_UART2
105 #define UART2_TX_PIN PD5
106 #define UART2_RX_PIN PD6
108 #define USE_UART3
109 #define UART3_TX_PIN PD8
110 #define UART3_RX_PIN PD9
112 #define USE_UART4
113 #define UART4_TX_PIN PB9
114 #define UART4_RX_PIN PB8
116 #define USE_UART6
117 #define UART6_TX_PIN PC6
118 #define UART6_RX_PIN PC7
120 #define USE_UART7
121 #define UART7_TX_PIN PE8
122 #define UART7_RX_PIN PE7
124 #define USE_UART8
125 #define UART8_TX_PIN PE1
126 #define UART8_RX_PIN PE0
128 #define SERIAL_PORT_COUNT 8
130 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
131 #define SERIALRX_PROVIDER SERIALRX_CRSF
132 #define SERIALRX_UART SERIAL_PORT_USART6
134 // *************** SDIO SD BLACKBOX*******************
135 #define USE_SDCARD
136 #define USE_SDCARD_SDIO
137 #define SDCARD_SDIO_DEVICE SDIODEV_1
138 #define SDCARD_SDIO_4BIT
140 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
142 // *************** ADC *****************************
143 #define USE_ADC
144 #define ADC_INSTANCE ADC1
146 #define ADC_CHANNEL_1_PIN PC0 //ADC123 VBAT1
147 #define ADC_CHANNEL_2_PIN PC1 //ADC123 CURR1
148 #define ADC_CHANNEL_3_PIN PC5 //ADC12 RSSI
149 #define ADC_CHANNEL_4_PIN PC4 //ADC12 AirS
151 #define VBAT_ADC_CHANNEL ADC_CHN_1
152 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
153 #define RSSI_ADC_CHANNEL ADC_CHN_3
154 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
156 // *************** PINIO ***************************
157 #define USE_PINIO
158 #define USE_PINIOBOX
159 #define PINIO1_PIN PD10 // VTX power switcher
160 #define PINIO2_PIN PD11 // 2xCamera switcher
162 // *************** LEDSTRIP ************************
163 #define USE_LED_STRIP
164 #define WS2811_PIN PA8
166 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
167 #define CURRENT_METER_SCALE 212
169 #ifdef IFLIGHT_BLITZ_H7_PRO
170 #define VBAT_SCALE_DEFAULT 2100
171 #else
172 #define VBAT_SCALE_DEFAULT 1100
173 #endif
175 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
177 #define TARGET_IO_PORTA 0xffff
178 #define TARGET_IO_PORTB 0xffff
179 #define TARGET_IO_PORTC 0xffff
180 #define TARGET_IO_PORTD 0xffff
181 #define TARGET_IO_PORTE 0xffff
183 #define MAX_PWM_OUTPUT_PORTS 12
184 #define USE_DSHOT
185 #define USE_ESC_SENSOR