add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / IFLIGHTF7_TWING / target.h
blobfb74f2d53099a54d0b122a23ae2b5c13a1cb3671
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight 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 * Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "IF7T"
22 #define USBD_PRODUCT_STRING "IFLIGHTF7_TWING"
24 #define LED0 PC4
26 #define BEEPER PC15
27 #define BEEPER_INVERTED
29 // *************** Gyro & ACC **********************
30 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS // Don't use common busdev descriptors for IMU
32 #define USE_SPI
33 #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_DUAL_GYRO
41 #define USE_IMU_MPU6500
42 #define IMU_0_ALIGN CW90_DEG
43 #define IMU_1_ALIGN CW0_DEG
45 #define MPU6500_0_CS_PIN PC3
46 #define MPU6500_0_SPI_BUS BUS_SPI1
47 #define MPU6500_0_EXTI_PIN PB2
49 #define MPU6500_1_CS_PIN PA15
50 #define MPU6500_1_SPI_BUS BUS_SPI1
51 #define MPU6500_1_EXTI_PIN PA8
54 #define USE_EXTI
55 #define USE_MPU_DATA_READY_SIGNAL
57 // *************** I2C/Baro/Mag *********************
58 #define USE_I2C
59 #define USE_I2C_DEVICE_2
60 #define I2C2_SCL PB10
61 #define I2C2_SDA PB11
63 #define USE_BARO
64 #define BARO_I2C_BUS BUS_I2C2
65 #define USE_BARO_BMP280
66 #define USE_BARO_DPS310
68 #define USE_MAG
69 #define MAG_I2C_BUS BUS_I2C2
70 #define USE_MAG_HMC5883
71 #define USE_MAG_QMC5883
72 #define USE_MAG_IST8310
73 #define USE_MAG_IST8308
74 #define USE_MAG_MAG3110
75 #define USE_MAG_LIS3MDL
77 #define TEMPERATURE_I2C_BUS BUS_I2C2
79 #define PITOT_I2C_BUS BUS_I2C2
81 #define USE_RANGEFINDER
82 #define RANGEFINDER_I2C_BUS BUS_I2C2
83 #define BNO055_I2C_BUS BUS_I2C2
85 // *************** FLASH **************************
86 #define M25P16_CS_PIN PB9
87 #define M25P16_SPI_BUS BUS_SPI3
88 #define USE_FLASHFS
89 #define USE_FLASH_M25P16
90 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
92 #define USE_SPI_DEVICE_3
93 #define SPI3_SCK_PIN PB3
94 #define SPI3_MISO_PIN PB4
95 #define SPI3_MOSI_PIN PB5
97 // *************** OSD *****************************
98 #define USE_SPI_DEVICE_2
99 #define SPI2_SCK_PIN PB13
100 #define SPI2_MISO_PIN PB14
101 #define SPI2_MOSI_PIN PB15
103 #define USE_MAX7456
104 #define MAX7456_SPI_BUS BUS_SPI2
105 #define MAX7456_CS_PIN PB12
107 // *************** UART *****************************
108 #define USE_VCP
110 #define USE_UART1
111 #define UART1_RX_PIN PA10
112 #define UART1_TX_PIN PA9
114 #define USE_UART2
115 #define UART2_RX_PIN PA3
116 #define UART2_TX_PIN PA2
118 #define USE_UART4
119 #define UART4_RX_PIN PC11
120 #define UART4_TX_PIN PC10
122 #define USE_UART5
123 #define UART5_RX_PIN PD2
124 #define UART5_TX_PIN PC12
126 #define SERIAL_PORT_COUNT 5
128 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
129 #define SERIALRX_PROVIDER SERIALRX_SBUS
130 #define SERIALRX_UART SERIAL_PORT_USART2
132 // *************** ADC *****************************
133 #define USE_ADC
134 #define ADC_INSTANCE ADC1
135 #define ADC1_DMA_STREAM DMA2_Stream0
136 #define ADC_CHANNEL_1_PIN PC1
137 #define ADC_CHANNEL_2_PIN PC2
138 #define ADC_CHANNEL_3_PIN PC0
140 #define VBAT_ADC_CHANNEL ADC_CHN_1
141 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
142 #define RSSI_ADC_CHANNEL ADC_CHN_3
144 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
146 #define USE_LED_STRIP
147 #define WS2811_PIN PA1
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 (BIT(2))
156 #define MAX_PWM_OUTPUT_PORTS 8
158 #define USE_DSHOT
159 #define USE_ESC_SENSOR