2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
28 #define TARGET_BOARD_IDENTIFIER "HGF7"
29 #define USBD_PRODUCT_STRING "HGLRCF722"
35 #define BEEPER_INVERTED
37 // *************** SPI1 Gyro & ACC *******************
38 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
41 #define USE_SPI_DEVICE_1
42 #define SPI1_SCK_PIN PA5
43 #define SPI1_MISO_PIN PA6
44 #define SPI1_MOSI_PIN PA7
48 #define USE_IMU_MPU6000
49 #define IMU_MPU6000_ALIGN CW180_DEG_FLIP
50 #define MPU6000_CS_PIN PB2
51 #define MPU6000_SPI_BUS BUS_SPI1
53 #define USE_IMU_BMI270
54 #define IMU_BMI270_ALIGN CW180_DEG_FLIP
55 #define BMI270_SPI_BUS BUS_SPI1
56 #define BMI270_CS_PIN PB2
58 // *************** I2C /Baro/Mag *********************
60 #define USE_I2C_DEVICE_1
65 #define USE_BARO_BMP280
66 #define USE_BARO_SPI_BMP280
67 #define BMP280_SPI_BUS BUS_SPI1
68 #define BMP280_CS_PIN PA4
69 #define BARO_I2C_BUS BUS_I2C1
70 #define USE_BARO_MS5611
71 #define USE_BARO_DPS310
74 #define MAG_I2C_BUS BUS_I2C1
77 #define TEMPERATURE_I2C_BUS BUS_I2C1
78 #define PITOT_I2C_BUS BUS_I2C1
80 #define USE_RANGEFINDER
81 #define RANGEFINDER_I2C_BUS BUS_I2C1
83 // *************** SPI2 OSD ***********************
84 #define USE_SPI_DEVICE_2
85 #define SPI2_SCK_PIN PB13
86 #define SPI2_MISO_PIN PB14
87 #define SPI2_MOSI_PIN PB15
90 #define MAX7456_SPI_BUS BUS_SPI2
91 #define MAX7456_CS_PIN PB12
93 // *************** SPI3 SD BLACKBOX*******************
94 #define USE_SPI_DEVICE_3
95 #define SPI3_SCK_PIN PC10
96 #define SPI3_MISO_PIN PC11
97 #define SPI3_MOSI_PIN PC12
100 #define USE_FLASH_M25P16
101 #define M25P16_SPI_BUS BUS_SPI3
102 #define M25P16_CS_PIN PD2
103 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
106 // *************** UART *****************************
108 #define USB_DETECT_PIN PC14
109 #define USE_USB_DETECT
112 #define UART1_TX_PIN PA9
113 #define UART1_RX_PIN PA10
116 #define UART2_TX_PIN PA2
117 #define UART2_RX_PIN PA3
120 #define UART3_TX_PIN PB10
121 #define UART3_RX_PIN PB11
124 #define UART4_TX_PIN PA0
125 #define UART4_RX_PIN PA1
128 #define UART6_TX_PIN PC6
129 #define UART6_RX_PIN PC7
131 #define SERIAL_PORT_COUNT 6
133 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
134 #define SERIALRX_PROVIDER SERIALRX_SBUS
135 #define SERIALRX_UART SERIAL_PORT_USART1
137 // *************** ADC *****************************
139 #define ADC_INSTANCE ADC1
140 #define ADC1_DMA_STREAM DMA2_Stream0
142 #define ADC_CHANNEL_1_PIN PC2
143 #define ADC_CHANNEL_2_PIN PC1
144 #define ADC_CHANNEL_3_PIN PC0
146 #define VBAT_ADC_CHANNEL ADC_CHN_1
147 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
148 #define RSSI_ADC_CHANNEL ADC_CHN_3
150 // *************** PINIO ***************************
153 #define PINIO1_PIN PC8 // VTX power switcher
154 #define PINIO2_PIN PC9 // 2xCamera switcher
156 // *************** LEDSTRIP ************************
157 #define USE_LED_STRIP
158 #define WS2811_PIN PA8
160 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
161 #define CURRENT_METER_SCALE 179
163 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
165 #define TARGET_IO_PORTA 0xffff
166 #define TARGET_IO_PORTB 0xffff
167 #define TARGET_IO_PORTC 0xffff
168 #define TARGET_IO_PORTD 0xffff
170 #define MAX_PWM_OUTPUT_PORTS 8
172 #define USE_ESC_SENSOR