Merge pull request #10492 from iNavFlight/MrD_Update-OSD.md-for-8.0
[inav.git] / src / main / target / JHEH7AIO / target.h
blob00ecf856e234fa1f82fbd6de33da709d9700c37e
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/>.
18 #pragma once
20 #define USE_TARGET_CONFIG
22 #define TARGET_BOARD_IDENTIFIER "JH7A"
23 #define USBD_PRODUCT_STRING "JHEH743AIO"
25 #define LED0 PC13
27 #define BEEPER_PIN PD15
28 #define BEEPER_INVERTED
30 // *************** SPI1 Gyro & ACC *******************
32 #define USE_SPI
33 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
37 #define SPI1_NSS_PIN PA4
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW0_DEG
41 #define MPU6000_CS_PIN SPI1_NSS_PIN
42 #define MPU6000_SPI_BUS BUS_SPI1
44 // *************** I2C1 Baro/Mag *********************
45 #define USE_I2C
46 #define USE_I2C_DEVICE_1
47 #define I2C1_SCL PB8
48 #define I2C1_SDA PB9
50 #define USE_BARO
51 #define BARO_I2C_BUS BUS_I2C1
52 #define USE_BARO_BMP280
53 #define USE_BARO_MS5611
54 #define USE_BARO_DPS310
56 #define USE_MAG
57 #define MAG_I2C_BUS BUS_I2C1
58 #define USE_MAG_ALL
60 #define TEMPERATURE_I2C_BUS BUS_I2C1
61 #define PITOT_I2C_BUS BUS_I2C1
63 #define USE_RANGEFINDER
64 #define RANGEFINDER_I2C_BUS BUS_I2C1
66 // *************** SPI2 ***********************
67 #define USE_SPI_DEVICE_2
68 #define SPI2_SCK_PIN PB13
69 #define SPI2_MISO_PIN PB14
70 #define SPI2_MOSI_PIN PB15
71 #define SPI2_NSS_PIN PB12
73 // *************** SPI3 BLACKBOX *******************
74 #define USE_SPI_DEVICE_3
75 #define SPI3_SCK_PIN PC10
76 #define SPI3_MISO_PIN PC11
77 #define SPI3_MOSI_PIN PC12
78 #define SPI3_NSS_PIN PA15
80 #define USE_FLASHFS
81 #define USE_FLASH_M25P16
82 #define M25P16_SPI_BUS BUS_SPI3
83 #define M25P16_CS_PIN SPI3_NSS_PIN
84 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
86 // *************** SPI4 OSD *******************
87 #define USE_SPI_DEVICE_4
88 #define SPI4_SCK_PIN PE2
89 #define SPI4_MISO_PIN PE5
90 #define SPI4_MOSI_PIN PE6
91 #define SPI4_NSS_PIN PE4
93 #define USE_MAX7456
94 #define MAX7456_SPI_BUS BUS_SPI4
95 #define MAX7456_CS_PIN SPI4_NSS_PIN
97 // *************** UART *****************************
98 #define USE_VCP
100 #define USE_UART1
101 #define UART1_RX_PIN PA10
102 #define UART1_TX_PIN PA9
104 #define USE_UART2
105 #define UART2_RX_PIN PA3
106 #define UART2_TX_PIN PA2
108 #define USE_UART3
109 #define UART3_RX_PIN PB11
110 #define UART3_TX_PIN PB10
112 #define USE_UART4
113 #define UART4_RX_PIN PA1
114 #define UART4_TX_PIN PA0
116 #define USE_UART6
117 #define UART6_RX_PIN PC7
118 #define UART6_TX_PIN PC6
120 #define USE_UART7
121 #define UART7_RX_PIN PE7
122 #define UART7_TX_PIN PE8
124 #define USE_UART8
125 #define UART8_RX_PIN PE0
126 #define UART8_TX_PIN PE1
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_USART2
134 // *************** ADC *****************************
135 #define USE_ADC
136 #define ADC_INSTANCE ADC3
138 #define ADC_CHANNEL_1_PIN PC3
139 #define ADC_CHANNEL_2_PIN PC2
140 #define ADC_CHANNEL_3_PIN PC5
142 #define VBAT_ADC_CHANNEL ADC_CHN_1
143 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
144 #define RSSI_ADC_CHANNEL ADC_CHN_3
146 // *************** LEDSTRIP ************************
147 #define USE_LED_STRIP
148 #define WS2811_PIN PD12
150 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
151 #define CURRENT_METER_SCALE 100
153 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
155 #define TARGET_IO_PORTA 0xffff
156 #define TARGET_IO_PORTB 0xffff
157 #define TARGET_IO_PORTC 0xffff
158 #define TARGET_IO_PORTD 0xffff
159 #define TARGET_IO_PORTE 0xffff
161 #define MAX_PWM_OUTPUT_PORTS 4
162 #define USE_DSHOT
163 #define USE_ESC_SENSOR