|
| 1 | +/* |
| 2 | + * This file is part of INAV. |
| 3 | + * |
| 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. |
| 8 | + * |
| 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. |
| 13 | + * |
| 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/>. |
| 16 | + */ |
| 17 | + |
| 18 | + |
| 19 | +#pragma once |
| 20 | + |
| 21 | +#define TARGET_BOARD_IDENTIFIER "2RH7" |
| 22 | + |
| 23 | +#define USBD_PRODUCT_STRING "IFLIGHT_2RAW_H743" |
| 24 | + |
| 25 | +#define LED0 PE3 |
| 26 | +#define LED1 PE4 |
| 27 | + |
| 28 | +#define BEEPER PC9 |
| 29 | +#define BEEPER_INVERTED |
| 30 | + |
| 31 | +// SPI Buses |
| 32 | +#define USE_SPI |
| 33 | + |
| 34 | +#define USE_SPI_DEVICE_1 |
| 35 | +#define SPI1_SCK_PIN PA5 |
| 36 | +#define SPI1_MISO_PIN PA6 |
| 37 | +#define SPI1_MOSI_PIN PD7 |
| 38 | + |
| 39 | +#define USE_SPI_DEVICE_2 |
| 40 | +#define SPI2_SCK_PIN PB13 |
| 41 | +#define SPI2_MISO_PIN PB14 |
| 42 | +#define SPI2_MOSI_PIN PB15 |
| 43 | + |
| 44 | +#define USE_SPI_DEVICE_3 |
| 45 | +#define SPI3_SCK_PIN PC10 |
| 46 | +#define SPI3_MISO_PIN PC11 |
| 47 | +#define SPI3_MOSI_PIN PC12 |
| 48 | + |
| 49 | +// I2C |
| 50 | +#define USE_I2C |
| 51 | +#define USE_I2C_DEVICE_1 |
| 52 | +#define I2C1_SCL PB6 |
| 53 | +#define I2C1_SDA PB7 |
| 54 | + |
| 55 | +#define USE_I2C_DEVICE_2 |
| 56 | +#define I2C2_SCL PB10 |
| 57 | +#define I2C2_SDA PB11 |
| 58 | + |
| 59 | +// Gyro |
| 60 | +#define USE_IMU_ICM42605 |
| 61 | +#define IMU_ICM42605_ALIGN CW0_DEG |
| 62 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 63 | +#define ICM42605_CS_PIN PC15 |
| 64 | + |
| 65 | +// OSD |
| 66 | +// #define USE_MAX7456 |
| 67 | +// #define MAX7456_SPI_BUS BUS_SPI2 |
| 68 | +// #define MAX7456_CS_PIN PB12 |
| 69 | + |
| 70 | +#define USE_BARO |
| 71 | +#define BARO_I2C_BUS BUS_I2C2 |
| 72 | +#define USE_BARO_ALL |
| 73 | + |
| 74 | +#define USE_MAG |
| 75 | +#define MAG_I2C_BUS BUS_I2C1 |
| 76 | +#define USE_MAG_ALL |
| 77 | + |
| 78 | +#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 79 | +#define PITOT_I2C_BUS BUS_I2C1 |
| 80 | +#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 81 | + |
| 82 | +// *************** UART ***************************** |
| 83 | +#define USE_VCP |
| 84 | + |
| 85 | +#define USE_UART1 |
| 86 | +#define UART1_TX_PIN PA9 |
| 87 | +#define UART1_RX_PIN PA10 |
| 88 | + |
| 89 | +#define USE_UART2 |
| 90 | +#define UART2_TX_PIN PD5 |
| 91 | +#define UART2_RX_PIN PD6 |
| 92 | + |
| 93 | +#define USE_UART3 |
| 94 | +#define UART3_TX_PIN PD8 |
| 95 | +#define UART3_RX_PIN PD9 |
| 96 | + |
| 97 | +#define USE_UART4 |
| 98 | +#define UART4_TX_PIN PB9 |
| 99 | +#define UART4_RX_PIN PB8 |
| 100 | + |
| 101 | +#define USE_UART6 |
| 102 | +#define UART6_TX_PIN PC6 |
| 103 | +#define UART6_RX_PIN PC7 |
| 104 | + |
| 105 | +#define USE_UART7 |
| 106 | +#define UART7_TX_PIN PE8 |
| 107 | +#define UART7_RX_PIN PE7 |
| 108 | + |
| 109 | +#define USE_UART8 |
| 110 | +#define UART8_TX_PIN PE1 |
| 111 | +#define UART8_RX_PIN PE0 |
| 112 | + |
| 113 | +#define SERIAL_PORT_COUNT 8 |
| 114 | + |
| 115 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 116 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 117 | +#define SERIALRX_UART SERIAL_PORT_USART6 |
| 118 | + |
| 119 | +// SD Card |
| 120 | +#define USE_SDCARD |
| 121 | +#define USE_SDCARD_SPI |
| 122 | +#define SDCARD_SPI_BUS BUS_SPI3 |
| 123 | +#define SDCARD_CS_PIN PA15 |
| 124 | + |
| 125 | +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT |
| 126 | + |
| 127 | +// ADC |
| 128 | +#define USE_ADC |
| 129 | +#define ADC_INSTANCE ADC1 |
| 130 | + |
| 131 | +#define ADC_CHANNEL_1_PIN PC0 |
| 132 | +#define ADC_CHANNEL_2_PIN PC1 |
| 133 | +#define ADC_CHANNEL_3_PIN PC5 |
| 134 | +#define ADC_CHANNEL_4_PIN PC4 |
| 135 | + |
| 136 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 137 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2 |
| 138 | +#define RSSI_ADC_CHANNEL ADC_CHN_3 |
| 139 | +#define AIRSPEED_ADC_CHANNEL ADC_CHN_4 |
| 140 | + |
| 141 | +#define VBAT_SCALE_DEFAULT 2100 |
| 142 | + |
| 143 | +// PINIO |
| 144 | +#define USE_PINIO |
| 145 | +#define USE_PINIOBOX |
| 146 | +#define PINIO1_PIN PD10 |
| 147 | +#define PINIO2_PIN PD11 |
| 148 | + |
| 149 | +// *************** LEDSTRIP ************************ |
| 150 | +// #define USE_LED_STRIP |
| 151 | +// #define WS2811_PIN PA8 |
| 152 | + |
| 153 | +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX) |
| 154 | +#define CURRENT_METER_SCALE 250 |
| 155 | + |
| 156 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 157 | + |
| 158 | +#define TARGET_IO_PORTA 0xffff |
| 159 | +#define TARGET_IO_PORTB 0xffff |
| 160 | +#define TARGET_IO_PORTC 0xffff |
| 161 | +#define TARGET_IO_PORTD 0xffff |
| 162 | +#define TARGET_IO_PORTE 0xffff |
| 163 | + |
| 164 | +#define MAX_PWM_OUTPUT_PORTS 12 |
| 165 | +#define USE_DSHOT |
| 166 | +#define USE_ESC_SENSOR |
| 167 | + |
0 commit comments