|
| 1 | +/* |
| 2 | + * This file is part of INAV Project. |
| 3 | + * |
| 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/. |
| 7 | + * |
| 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: |
| 10 | + * |
| 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. |
| 15 | + * |
| 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. |
| 20 | + * |
| 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/. |
| 23 | + */ |
| 24 | + |
| 25 | + |
| 26 | +#pragma once |
| 27 | + |
| 28 | +#define TARGET_BOARD_IDENTIFIER "HG7W" |
| 29 | +#define USBD_PRODUCT_STRING "HGLRC_H743_WING" |
| 30 | + |
| 31 | +#define USE_TARGET_CONFIG |
| 32 | + |
| 33 | +#define LED0 PE6 |
| 34 | +#define LED1 PE4 |
| 35 | + |
| 36 | +#define BEEPER PE5 |
| 37 | +#define BEEPER_INVERTED |
| 38 | + |
| 39 | +#define USE_VCP |
| 40 | + |
| 41 | +#define USE_UART1 |
| 42 | +#define UART1_TX_PIN PA9 |
| 43 | +#define UART1_RX_PIN PA10 |
| 44 | + |
| 45 | +#define USE_UART2 |
| 46 | +#define UART2_TX_PIN PD5 |
| 47 | +#define UART2_RX_PIN PD6 |
| 48 | + |
| 49 | +#define USE_UART3 |
| 50 | +#define UART3_TX_PIN PD8 |
| 51 | +#define UART3_RX_PIN PD9 |
| 52 | + |
| 53 | +#define USE_UART4 |
| 54 | +#define UART4_TX_PIN PD1 |
| 55 | +#define UART4_RX_PIN PA1 |
| 56 | + |
| 57 | +#define USE_UART5 |
| 58 | +#define UART5_TX_PIN PB6 |
| 59 | +#define UART5_RX_PIN PB5 |
| 60 | + |
| 61 | +#define USE_UART7 |
| 62 | +#define UART7_TX_PIN PE8 |
| 63 | +#define UART7_RX_PIN PE7 |
| 64 | + |
| 65 | +#define SERIAL_PORT_COUNT 7 |
| 66 | + |
| 67 | +#define USE_SPI |
| 68 | + |
| 69 | +// SPI1 (IMU) |
| 70 | +#define USE_SPI_DEVICE_1 |
| 71 | +#define SPI1_SCK_PIN PA5 |
| 72 | +#define SPI1_MISO_PIN PA6 |
| 73 | +#define SPI1_MOSI_PIN PA7 |
| 74 | +#define SPI1_NSS_PIN PA4 |
| 75 | + |
| 76 | +// SPI2 (OSD) |
| 77 | +#define USE_SPI_DEVICE_2 |
| 78 | +#define SPI2_SCK_PIN PB13 |
| 79 | +#define SPI2_MISO_PIN PB14 |
| 80 | +#define SPI2_MOSI_PIN PB15 |
| 81 | +#define SPI2_NSS_PIN PB12 |
| 82 | + |
| 83 | +// SPI3 (Flash) |
| 84 | +#define USE_SPI_DEVICE_3 |
| 85 | +#define SPI3_SCK_PIN PB3 |
| 86 | +#define SPI3_MISO_PIN PB4 |
| 87 | +#define SPI3_MOSI_PIN PB2 |
| 88 | +#define SPI3_NSS_PIN PA15 |
| 89 | + |
| 90 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 91 | +#define ICM42605_CS_PIN PA4 |
| 92 | +#define USE_IMU_ICM42605 |
| 93 | +#define IMU_ICM42605_ALIGN CW0_DEG |
| 94 | + |
| 95 | +#define USE_MAX7456 |
| 96 | +#define MAX7456_SPI_BUS BUS_SPI2 |
| 97 | +#define MAX7456_CS_PIN PB12 |
| 98 | + |
| 99 | +#define USE_I2C |
| 100 | + |
| 101 | +#define USE_I2C_DEVICE_1 |
| 102 | +#define I2C1_SCL PB8 |
| 103 | +#define I2C1_SDA PB7 |
| 104 | + |
| 105 | +#define USE_I2C_DEVICE_2 |
| 106 | +#define I2C2_SCL PB10 |
| 107 | +#define I2C2_SDA PB11 |
| 108 | + |
| 109 | +#define USE_BARO |
| 110 | +#define BARO_I2C_BUS BUS_I2C2 |
| 111 | +#define USE_BARO_DPS310 |
| 112 | +#define USE_BARO_SPL06 |
| 113 | + |
| 114 | +#define USE_MAG |
| 115 | +#define MAG_I2C_BUS BUS_I2C1 |
| 116 | +#define USE_MAG_ALL |
| 117 | + |
| 118 | +#define USE_RANGEFINDER |
| 119 | +#define USE_RANGEFINDER_US42 |
| 120 | +#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 121 | +#define PITOT_I2C_BUS BUS_I2C1 |
| 122 | +#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 123 | + |
| 124 | +#define USE_SDCARD |
| 125 | +#define USE_SDCARD_SDIO |
| 126 | +#define SDCARD_SDIO_DEVICE SDIODEV_1 |
| 127 | +#define SDCARD_SDIO_4BIT |
| 128 | + |
| 129 | +#define USE_ADC |
| 130 | +#define ADC_INSTANCE ADC1 |
| 131 | + |
| 132 | +#define ADC_CHANNEL_1_PIN PC0 |
| 133 | +#define ADC_CHANNEL_2_PIN PC1 |
| 134 | +#define ADC_CHANNEL_3_PIN PC4 |
| 135 | + |
| 136 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 137 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2 |
| 138 | +#define AIRSPEED_ADC_CHANNEL ADC_CHN_3 |
| 139 | + |
| 140 | +#define USE_PINIO |
| 141 | +#define USE_PINIOBOX |
| 142 | +#define PINIO1_PIN PE2 |
| 143 | +#define PINIO2_PIN PE1 |
| 144 | + |
| 145 | +#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_BLACKBOX | FEATURE_AIRMODE) |
| 146 | +#define CURRENT_METER_SCALE 200 |
| 147 | +#define VBAT_SCALE_DEFAULT 2100 |
| 148 | + |
| 149 | +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT |
| 150 | + |
| 151 | +#define TARGET_IO_PORTA 0xffff |
| 152 | +#define TARGET_IO_PORTB 0xffff |
| 153 | +#define TARGET_IO_PORTC 0xffff |
| 154 | +#define TARGET_IO_PORTD 0xffff |
| 155 | +#define TARGET_IO_PORTE 0xffff |
| 156 | + |
| 157 | +#define MAX_PWM_OUTPUT_PORTS 13 |
| 158 | + |
| 159 | +#define USE_DSHOT |
| 160 | +#define USE_ESC_SENSOR |
| 161 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 162 | + |
| 163 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 164 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 165 | +#define SERIALRX_UART SERIAL_PORT_USART2 |
| 166 | + |
| 167 | +#define GPS_UART SERIAL_PORT_USART3 |
| 168 | + |
| 169 | +#define USE_LED_STRIP |
| 170 | +#define WS2811_PIN PA0 |
0 commit comments