add GEPRC_TAKER_H743
[inav.git] / src / main / target / GEPRC_TAKER_H743 / target.h
blob7f2756ebf9ce82cdec69af1c74ed189bf15fd89c
1 /*
2 * This file is part of INAV Project.
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 "GEPR"
21 #define USBD_PRODUCT_STRING "GEPRC_TAKER_H743"
23 #define USE_TARGET_CONFIG
25 #define LED0 PC13
27 #define BEEPER PD2
28 #define BEEPER_INVERTED
31 //**************** SPI BUS *************************
32 #define USE_SPI
34 #define USE_SPI_DEVICE_1
35 #define SPI1_SCK_PIN PA5
36 #define SPI1_MISO_PIN PA6
37 #define SPI1_MOSI_PIN PA7
39 #define USE_SPI_DEVICE_2
40 #define SPI2_SCK_PIN PB13
41 #define SPI2_MISO_PIN PB14
42 #define SPI2_MOSI_PIN PB15
44 #define USE_SPI_DEVICE_3
45 #define SPI3_SCK_PIN PC10
46 #define SPI3_MISO_PIN PC11
47 #define SPI3_MOSI_PIN PC12
49 #define USE_SPI_DEVICE_4
50 #define SPI4_SCK_PIN PE2
51 #define SPI4_MISO_PIN PE5
52 #define SPI4_MOSI_PIN PE6
56 // *************** Gyro & ACC **********************
58 #define USE_DUAL_GYRO
59 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
60 #define USE_IMU_MPU6000
61 #define USE_IMU_ICM42605
64 // *****IMU1 MPU6000 & ICM42688 ON SPI1 **************
65 #define IMU1_ALIGN CW180_DEG
66 #define IMU1_SPI_BUS BUS_SPI1
67 #define IMU1_CS_PIN PA4
71 // *****IMU2 MPU6000 & ICM42688 ON SPI2 **************
72 #define IMU2_ALIGN CW0_DEG
73 #define IMU2_SPI_BUS BUS_SPI2
74 #define IMU2_CS_PIN PB12
77 // *************** I2C/Baro/Mag *********************
78 #define USE_I2C
79 #define USE_I2C_DEVICE_1
80 #define I2C1_SCL PB8
81 #define I2C1_SDA PB9
84 #define USE_BARO
85 #define BARO_I2C_BUS BUS_I2C1
86 #define USE_BARO_BMP280
87 #define USE_BARO_DPS310
88 #define USE_BARO_MS5611
90 #define USE_MAG
91 #define MAG_I2C_BUS BUS_I2C1
92 #define USE_MAG_ALL
94 #define TEMPERATURE_I2C_BUS BUS_I2C1
96 #define PITOT_I2C_BUS BUS_I2C1
98 #define USE_RANGEFINDER
99 #define RANGEFINDER_I2C_BUS BUS_I2C1
100 #define BNO055_I2C_BUS BUS_I2C1
102 // *************** FLASH **************************
103 #define USE_SDCARD
104 #define USE_SDCARD_SPI
105 #define SDCARD_SPI_BUS BUS_SPI3
106 #define SDCARD_CS_PIN PA15
108 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
111 // ************PINIO to disable BT*****************
112 #define USE_PINIO
113 #define USE_PINIOBOX
114 #define PINIO1_PIN PE13
115 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
118 // ************PINIO to other
119 #define PINIO2_PIN PC14 //Enable vsw
122 // *************** OSD *****************************
123 #define USE_MAX7456
124 #define MAX7456_SPI_BUS BUS_SPI4
125 #define MAX7456_CS_PIN PE4
127 // *************** UART *****************************
128 #define USE_VCP
130 #define USE_UART1
131 #define UART1_RX_PIN PA10
132 #define UART1_TX_PIN PA9
134 #define USE_UART2
135 #define UART2_RX_PIN PA3
136 #define UART2_TX_PIN PA2
138 #define USE_UART3
139 #define UART3_RX_PIN PB11
140 #define UART3_TX_PIN PB10
142 #define USE_UART4
143 #define UART4_RX_PIN PA1
144 #define UART4_TX_PIN PA0
146 #define USE_UART6
147 #define UART6_RX_PIN PC7
148 #define UART6_TX_PIN PC6
150 #define USE_UART7
151 #define UART7_RX_PIN PE7
152 #define UART7_TX_PIN PE8
154 #define USE_UART8
155 #define UART8_RX_PIN PE0
156 #define UART8_TX_PIN PE1
158 #define SERIAL_PORT_COUNT 8
160 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
161 #define SERIALRX_PROVIDER SERIALRX_SBUS
162 #define SERIALRX_UART SERIAL_PORT_USART2
164 // *************** ADC *****************************
165 #define USE_ADC
166 #define ADC_INSTANCE ADC3
167 // #define ADC1_DMA_STREAM DMA2_Stream0
168 #define ADC_CHANNEL_1_PIN PC3
169 #define ADC_CHANNEL_2_PIN PC5
170 #define ADC_CHANNEL_3_PIN PC2
172 #define VBAT_ADC_CHANNEL ADC_CHN_1
173 #define RSSI_ADC_CHANNEL ADC_CHN_2
174 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
176 #define VBAT_SCALE_DEFAULT 1120
178 //****************************************************
180 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
182 #define USE_LED_STRIP
183 #define WS2811_PIN PA8
185 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
187 #define TARGET_IO_PORTA 0xffff
188 #define TARGET_IO_PORTB 0xffff
189 #define TARGET_IO_PORTC 0xffff
190 #define TARGET_IO_PORTD 0xffff
191 #define TARGET_IO_PORTE 0xffff
193 #define MAX_PWM_OUTPUT_PORTS 8
195 #define USE_DSHOT
196 #define USE_ESC_SENSOR