add lucid h7
[inav.git] / src / main / target / TBS_LUCID_H7 / target.h
blobd499464fa534a0b8c21ab1f46a5ba7336caad10b
1 /*
2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
26 #pragma once
28 #define TARGET_BOARD_IDENTIFIER "LUH7"
30 #define USBD_PRODUCT_STRING "TBS_LUCID_H7"
32 #define USE_TARGET_CONFIG
34 #define LED0 PE3
35 #define LED1 PE4
37 #define BEEPER PA15
38 #define BEEPER_INVERTED
39 #define BEEPER_PWM_FREQUENCY 2500
41 #define USE_VCP
43 #define USE_UART1
44 #define UART1_TX_PIN PA9
45 #define UART1_RX_PIN PA10
47 #define USE_UART2
48 #define UART2_TX_PIN PD5
49 #define UART2_RX_PIN PD6
51 #define USE_UART3
52 #define UART3_TX_PIN PD8
53 #define UART3_RX_PIN PD9
55 #define USE_UART4
56 #define UART4_TX_PIN PB9
57 #define UART4_RX_PIN PB8
59 #define USE_UART6
60 #define UART6_TX_PIN PC6
61 #define UART6_RX_PIN PC7
63 #define USE_UART7
64 #define UART7_TX_PIN PE8
65 #define UART7_RX_PIN PE7
67 #define USE_UART8
68 #define UART8_TX_PIN PE1
69 #define UART8_RX_PIN PE0
71 #define SERIAL_PORT_COUNT 8
73 #define USE_SPI
75 #define USE_SPI_DEVICE_1
76 #define SPI1_SCK_PIN PA5
77 #define SPI1_MISO_PIN PA6
78 #define SPI1_MOSI_PIN PD7
80 #define USE_SPI_DEVICE_2
81 #define SPI2_SCK_PIN PB13
82 #define SPI2_MISO_PIN PB14
83 #define SPI2_MOSI_PIN PB15
85 #define USE_SPI_DEVICE_3
86 #define SPI3_SCK_PIN PB3
87 #define SPI3_MISO_PIN PB4
88 #define SPI3_MOSI_PIN PB5
90 #define USE_SPI_DEVICE_4
91 #define SPI4_SCK_PIN PE12
92 #define SPI4_MISO_PIN PE13
93 #define SPI4_MOSI_PIN PE14
95 #define USE_DUAL_GYRO
96 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
98 #define GYRO1_SPI_BUS BUS_SPI1
99 #define GYRO1_CS_PIN PC15
100 #define GYRO2_SPI_BUS BUS_SPI4
101 #define GYRO2_CS_PIN PC13
103 #define USE_IMU_MPU6000
104 #define IMU_MPU6000_ALIGN CW0_DEG_FLIP
106 #define USE_IMU_ICM42605
107 #define IMU_ICM42605_ALIGN CW90_DEG_FLIP
109 #define USE_MAX7456
110 #define MAX7456_SPI_BUS BUS_SPI2
111 #define MAX7456_CS_PIN PB12
113 #define USE_I2C
115 #define USE_I2C_DEVICE_1
116 #define I2C1_SCL PB6
117 #define I2C1_SDA PB7
119 #define USE_I2C_DEVICE_2
120 #define I2C2_SCL PB10
121 #define I2C2_SDA PB11
123 #define USE_BARO
124 #define USE_BARO_DPS310
125 #define BARO_I2C_BUS BUS_I2C2
127 #define USE_MAG
128 #define MAG_I2C_BUS BUS_I2C1
129 #define USE_MAG_ALL
131 #define TEMPERATURE_I2C_BUS BUS_I2C2
132 #define PITOT_I2C_BUS BUS_I2C2
134 #define USE_RANGEFINDER
135 #define RANGEFINDER_I2C_BUS BUS_I2C1
137 #define USE_SDCARD
138 #define USE_SDCARD_SDIO
139 #define SDCARD_SDIO_DEVICE SDIODEV_1
140 #define SDCARD_SDIO_4BIT
142 #define USE_ADC
143 #define ADC_INSTANCE ADC1
145 #define ADC_CHANNEL_1_PIN PC0
146 #define ADC_CHANNEL_2_PIN PC1
147 #define ADC_CHANNEL_3_PIN PC5
148 #define ADC_CHANNEL_4_PIN PC4
149 #define ADC_CHANNEL_5_PIN PA4
150 #define ADC_CHANNEL_6_PIN PA7
152 #define VBAT_ADC_CHANNEL ADC_CHN_1
153 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
154 #define RSSI_ADC_CHANNEL ADC_CHN_3
155 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
157 #define USE_PINIO
158 #define USE_PINIOBOX
159 #define PINIO1_PIN PD10
160 #define PINIO2_PIN PD11
162 #define USE_LED_STRIP
163 #define WS2811_PIN PA8
165 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
166 #define CURRENT_METER_SCALE 250
168 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
169 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
171 #define TARGET_IO_PORTA 0xffff
172 #define TARGET_IO_PORTB 0xffff
173 #define TARGET_IO_PORTC 0xffff
174 #define TARGET_IO_PORTD 0xffff
175 #define TARGET_IO_PORTE 0xffff
177 #define MAX_PWM_OUTPUT_PORTS 15
178 #define USE_DSHOT
179 #define USE_ESC_SENSOR
181 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
182 #define SERIALRX_PROVIDER SERIALRX_CRSF
183 #define SERIALRX_UART SERIAL_PORT_USART6