Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / JHEMCUF745 / target.h
blobdfd45749d2d22fc6ec708eed9dd1b5d40ba03f14
1 /*
2 * This file is part of INAV.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "JHF7"
24 #define USBD_PRODUCT_STRING "JHEMCUF745"
26 #define LED0 PA2
28 #define BEEPER PD15
29 #define BEEPER_INVERTED
31 #define USE_DSHOT
32 #define USE_DSHOT_DMAR
33 #define USE_ESC_SENSOR
35 #define USE_IMU_MPU6000
36 #define IMU_MPU6000_ALIGN CW270_DEG
37 #define GYRO_INT_EXTI PE1
38 #define MPU6000_CS_PIN SPI4_NSS_PIN
39 #define MPU6000_SPI_BUS BUS_SPI4
41 #define USE_IMU_ICM42605
42 #define IMU_ICM42605_ALIGN CW270_DEG
43 #define ICM42605_CS_PIN SPI4_NSS_PIN
44 #define ICM42605_SPI_BUS BUS_SPI4
45 #define ICM42605_EXTI_PIN PE1
47 #define USB_IO
48 #define USE_VCP
49 #define VBUS_SENSING_ENABLED
50 #define VBUS_SENSING_PIN PA8
52 #define USE_UART1
53 #define UART1_TX_PIN PA9
54 #define UART1_RX_PIN PA10
56 #define USE_UART2
57 #define UART2_TX_PIN PD5
58 #define UART2_RX_PIN PD6
60 #define USE_UART3
61 #define UART3_TX_PIN PB10
62 #define UART3_RX_PIN PB11
64 #define USE_UART4
65 #define UART4_TX_PIN PA0
66 #define UART4_RX_PIN PA1
68 #define USE_UART5
69 #define UART5_TX_PIN PC12
70 #define UART5_RX_PIN PD2
72 #define USE_UART6
73 #define UART6_TX_PIN PC6
74 #define UART6_RX_PIN PC7
76 #define USE_UART7
77 #define UART7_RX_PIN PE7
78 #define UART7_TX_PIN PE8
80 #define SERIAL_PORT_COUNT 8 // VCP,UART1,UART2,UART3,UART4,UART5,UART6
82 #define USE_SPI
83 #define USE_SPI_DEVICE_1 // FLASH
84 #define USE_SPI_DEVICE_2 // OSD
85 #define USE_SPI_DEVICE_4 // ICM20689
87 #define SPI1_NSS_PIN PA4
88 #define SPI1_SCK_PIN PA5
89 #define SPI1_MISO_PIN PA6
90 #define SPI1_MOSI_PIN PA7
92 #define SPI2_NSS_PIN PB12
93 #define SPI2_SCK_PIN PB13
94 #define SPI2_MISO_PIN PB14
95 #define SPI2_MOSI_PIN PB15
97 #define SPI4_NSS_PIN PE4
98 #define SPI4_SCK_PIN PE2
99 #define SPI4_MISO_PIN PE5
100 #define SPI4_MOSI_PIN PE6
102 #define USE_MAX7456
103 #define MAX7456_SPI_BUS BUS_SPI2
104 #define MAX7456_CS_PIN SPI2_NSS_PIN
106 #define M25P16_CS_PIN SPI1_NSS_PIN
107 #define M25P16_SPI_BUS BUS_SPI1
108 #define USE_FLASHFS
109 #define USE_FLASH_M25P16
110 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
112 #define USE_I2C
113 #define USE_I2C_DEVICE_1
114 #define I2C1_SCL PB6
115 #define I2C1_SDA PB7
117 // External I2C bus is the same as interal one
118 #define MAG_I2C_BUS BUS_I2C1
119 #define TEMPERATURE_I2C_BUS BUS_I2C1
120 #define RANGEFINDER_I2C_BUS BUS_I2C1
121 #define DEFAULT_I2C_BUS BUS_I2C1
123 #define USE_BARO
124 #define USE_BARO_ALL
125 #define BARO_I2C_BUS BUS_I2C1
127 #define USE_MAG
128 #define USE_MAG_ALL
130 #define USE_ADC
131 #define ADC_CHANNEL_1_PIN PC2
132 #define ADC_CHANNEL_2_PIN PC3
133 #define ADC_CHANNEL_3_PIN PC5
135 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
136 #define VBAT_ADC_CHANNEL ADC_CHN_2
137 #define RSSI_ADC_CHANNEL ADC_CHN_3
139 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
141 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_VBAT | FEATURE_BLACKBOX)
142 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
143 #define SERIALRX_UART SERIAL_PORT_USART1
144 #define SERIALRX_PROVIDER SERIALRX_SBUS
146 #define USE_LED_STRIP
147 #define WS2811_PIN PD12
149 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
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
157 #define MAX_PWM_OUTPUT_PORTS 8