Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / JHEMCUF722 / target.h
blob2777df365e360366e91bd2a35d2a12c07583db9c
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 TARGET_BOARD_IDENTIFIER "JHF7"
21 #define USBD_PRODUCT_STRING "JHEMCUF722"
23 #define LED0 PA15
25 #define USE_BEEPER
26 #define BEEPER PC15
27 #define BEEPER_INVERTED
29 // PINIO
30 #define USE_PINIO
31 #define USE_PINIOBOX
32 #define PINIO1_PIN PC14
33 #define PINIO2_PIN PB9
35 // UART
36 #define USB_IO
37 #define USE_VCP
39 #define USE_UART1
40 #define UART1_RX_PIN PA10
41 #define UART1_TX_PIN PA9
43 #define USE_UART2
44 #define UART2_RX_PIN PA3
45 #define UART2_TX_PIN PA2
47 #define USE_UART3
48 #define UART3_RX_PIN PB11
49 #define UART3_TX_PIN PB10
51 #define USE_UART4
52 #define UART4_RX_PIN PA1
53 #define UART4_TX_PIN PA0
55 #define USE_UART5
56 #define UART5_RX_PIN PD2
57 #define UART5_TX_PIN PC12
59 #define USE_UART6
60 #define UART6_RX_PIN PC7
61 #define UART6_TX_PIN PC6
63 #define SERIAL_PORT_COUNT 7
65 // Gyro & Acc
66 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
68 #define USE_SPI
69 #define USE_SPI_DEVICE_1
70 #define SPI1_SCK_PIN PA5
71 #define SPI1_MISO_PIN PA6
72 #define SPI1_MOSI_PIN PA7
74 #define USE_IMU_ICM42605
75 #define IMU_ICM42605_ALIGN CW90_DEG
76 #define ICM42605_SPI_BUS BUS_SPI1
77 #define ICM42605_CS_PIN PA4
78 #define ICM42605_EXTI_PIN PC3
80 #define USE_IMU_BMI270
81 #define IMU_BMI270_ALIGN CW90_DEG
82 #define BMI270_SPI_BUS BUS_SPI1
83 #define BMI270_CS_PIN PA4
84 #define BMI270_EXTI_PIN PC3
86 #define USE_IMU_MPU6000
87 #define IMU_MPU6000_ALIGN CW90_DEG
88 #define MPU6000_SPI_BUS BUS_SPI1
89 #define MPU6000_CS_PIN PA4
90 #define MPU6000_EXTI_PIN PC3
92 // I2C (Baro & Mag)
93 #define USE_I2C
95 #define USE_I2C_DEVICE_1
96 #define I2C1_SCL PB6
97 #define I2C1_SDA PB7
99 // Baro
100 #define USE_BARO
101 #define USE_BARO_BMP280
102 #define USE_BARO_MS5611
103 #define USE_BARO_DPS310
104 #define USE_BARO_SPL06
105 #define BARO_I2C_BUS BUS_I2C1
107 // Mag
108 #define USE_MAG
109 #define MAG_I2C_BUS BUS_I2C1
110 #define USE_MAG_ALL
112 // Onboard Flash
113 #define USE_SPI_DEVICE_3
114 #define SPI3_SCK_PIN PC10
115 #define SPI3_MISO_PIN PC11
116 #define SPI3_MOSI_PIN PB5
118 #define M25P16_SPI_BUS BUS_SPI3
119 #define M25P16_CS_PIN PC13
121 #define W25N01G_SPI_BUS BUS_SPI3
122 #define W25N01G_CS_PIN PC13
124 #define USE_FLASHFS
125 #define USE_FLASH_M25P16
126 #define USE_FLASH_W25N01G
127 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
129 // OSD
130 #define USE_OSD
131 #define USE_SPI_DEVICE_2
132 #define SPI2_SCK_PIN PB13
133 #define SPI2_MISO_PIN PB14
134 #define SPI2_MOSI_PIN PB15
136 #define USE_MAX7456
137 #define MAX7456_SPI_BUS BUS_SPI2
138 #define MAX7456_CS_PIN PB12
140 // ADC
141 #define USE_ADC
142 #define ADC_CHANNEL_1_PIN PC1
143 #define ADC_CHANNEL_2_PIN PC2
144 #define ADC_CHANNEL_3_PIN PC0
146 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
147 #define VBAT_ADC_CHANNEL ADC_CHN_2
148 #define RSSI_ADC_CHANNEL ADC_CHN_3
150 // LED
151 #define USE_LED_STRIP
152 #define WS2811_PIN PA8
154 // Optical Flow & Lidar
155 #define USE_RANGEFINDER
156 #define USE_RANGEFINDER_MSP
157 #define USE_OPFLOW
158 #define USE_OPFLOW_MSP
160 // Misc
161 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
162 #define USE_DSHOT
163 #define USE_ESC_SENSOR
164 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
166 #define SERIALRX_UART SERIAL_PORT_USART2
167 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
168 #define SERIALRX_PROVIDER SERIALRX_SBUS
170 #define MAX_PWM_OUTPUT_PORTS 6
172 #define CURRENT_METER_SCALE 250
174 #define TARGET_IO_PORTA 0xffff
175 #define TARGET_IO_PORTB 0xffff
176 #define TARGET_IO_PORTC 0xffff
177 #define TARGET_IO_PORTD (BIT(2))