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/>.
20 #define TARGET_BOARD_IDENTIFIER "JHEH743HD"
21 #define USBD_PRODUCT_STRING "JHEMCUH743HD"
23 #define USE_TARGET_CONFIG
29 #define BEEPER_INVERTED
31 // *************** IMU generic ***********************
33 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
35 // *************** SPI1 IMU0 MPU6000 ****************
37 #define USE_SPI_DEVICE_1
38 #define SPI1_SCK_PIN PA5
39 #define SPI1_MISO_PIN PA6
40 #define SPI1_MOSI_PIN PA7
42 #define USE_IMU_MPU6000
43 #define IMU_MPU6000_ALIGN CW180_DEG
44 #define MPU6000_SPI_BUS BUS_SPI1
45 #define MPU6000_CS_PIN PA4
47 #define USE_IMU_BMI270
48 #define IMU_BMI270_ALIGN CW180_DEG
49 #define BMI270_SPI_BUS BUS_SPI1
50 #define BMI270_CS_PIN PA4
52 #define USE_IMU_ICM42605
53 #define IMU_ICM42605_ALIGN CW180_DEG
54 #define ICM42605_SPI_BUS BUS_SPI1
55 #define ICM42605_CS_PIN PA4
57 // *************** SPI2 OSD ***********************
58 #define USE_SPI_DEVICE_2
59 #define SPI2_SCK_PIN PB13
60 #define SPI2_MISO_PIN PB14
61 #define SPI2_MOSI_PIN PB15
64 #define MAX7456_SPI_BUS BUS_SPI2
65 #define MAX7456_CS_PIN PB12
67 // *************** SPI3 FLASH ***********************
68 #define USE_SPI_DEVICE_3
69 #define SPI3_SCK_PIN PC10
70 #define SPI3_MISO_PIN PC11
71 #define SPI3_MOSI_PIN PB2
72 #define SPI3_NSS_PIN PA15
73 #define SPI3_SCK_AF GPIO_AF6_SPI3
74 #define SPI3_MISO_AF GPIO_AF6_SPI3
75 #define SPI3_MOSI_AF GPIO_AF7_SPI3
77 #define M25P16_SPI_BUS BUS_SPI3
78 #define M25P16_CS_PIN SPI3_NSS_PIN
80 #define W25N01G_SPI_BUS BUS_SPI3
81 #define W25N01G_CS_PIN SPI3_NSS_PIN
85 #define USE_FLASH_M25P16
86 #define USE_FLASH_W25N01G
87 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
89 // *************** I2C /Baro/Mag *********************
91 #define USE_I2C_DEVICE_1
95 #define USE_I2C_DEVICE_2
100 #define BARO_I2C_BUS BUS_I2C1
104 #define MAG_I2C_BUS BUS_I2C1
107 #define TEMPERATURE_I2C_BUS BUS_I2C1
108 #define PITOT_I2C_BUS BUS_I2C1
110 #define USE_RANGEFINDER
111 #define RANGEFINDER_I2C_BUS BUS_I2C1
113 // *************** UART *****************************
117 #define UART1_TX_PIN PA9
118 #define UART1_RX_PIN PA10
121 #define UART2_TX_PIN PD5
122 #define UART2_RX_PIN PD6
125 #define UART3_TX_PIN PD8
126 #define UART3_RX_PIN PD9
129 #define UART4_TX_PIN PD1
130 #define UART4_RX_PIN PD0
133 #define UART5_TX_PIN PC12
134 #define UART5_RX_PIN PD2
137 #define UART6_TX_PIN PC6
138 #define UART6_RX_PIN PC7
141 #define UART7_TX_PIN PE8
142 #define UART7_RX_PIN PE7
145 #define UART8_TX_PIN PE1
146 #define UART8_RX_PIN PE0
148 #define SERIAL_PORT_COUNT 9
150 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
151 #define SERIALRX_PROVIDER SERIALRX_SBUS
153 // *************** ADC *****************************
155 #define ADC_INSTANCE ADC3
157 #ifdef MAMBAH743_2022B
159 #define ADC_CHANNEL_1_PIN PC1
160 #define ADC_CHANNEL_2_PIN PC3
161 #define ADC_CHANNEL_3_PIN PC0
163 #define VBAT_ADC_CHANNEL ADC_CHN_1
164 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
165 #define AIRSPEED_ADC_CHANNEL ADC_CHN_3
169 #define ADC_CHANNEL_1_PIN PC1
170 #define ADC_CHANNEL_2_PIN PC3
171 #define ADC_CHANNEL_3_PIN PC2
172 #define ADC_CHANNEL_4_PIN PC0
174 #define VBAT_ADC_CHANNEL ADC_CHN_1
175 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
176 #define RSSI_ADC_CHANNEL ADC_CHN_3
177 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
181 // *************** PINIO ***************************
185 #define PINIO1_PIN PC2
186 #define PINIO2_PIN PC5
188 // *************** LEDSTRIP ************************
189 #define USE_LED_STRIP
190 #define WS2811_PIN PA8
192 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
193 #define CURRENT_METER_SCALE 250
195 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
197 #define TARGET_IO_PORTA 0xffff
198 #define TARGET_IO_PORTB 0xffff
199 #define TARGET_IO_PORTC 0xffff
200 #define TARGET_IO_PORTD 0xffff
201 #define TARGET_IO_PORTE 0xffff
203 #define MAX_PWM_OUTPUT_PORTS 8
205 #define USE_ESC_SENSOR