add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / FURYF4OSD / target.h
blob9e8283dfff391162ac528915362bcfdfd88f570d
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 #ifdef MAMBAF405
21 #define TARGET_BOARD_IDENTIFIER "MBF4"
22 #define USBD_PRODUCT_STRING "MAMBAF405"
23 #else
24 #define TARGET_BOARD_IDENTIFIER "FYF4"
25 #define USBD_PRODUCT_STRING "FuryF4"
26 #endif
28 #define LED0 PB5
29 #define LED1 PB4
31 #define BEEPER PA8
32 #define BEEPER_INVERTED
34 // *************** Gyro & ACC **********************
35 #define USE_SPI
36 #define USE_SPI_DEVICE_1
38 #define USE_IMU_MPU6500
39 #define IMU_MPU6500_ALIGN CW180_DEG
40 #define MPU6500_CS_PIN PA4
41 #define MPU6500_SPI_BUS BUS_SPI1
43 #define USE_IMU_MPU6000
44 #define IMU_MPU6000_ALIGN CW180_DEG
45 #define MPU6000_CS_PIN PA4
46 #define MPU6000_SPI_BUS BUS_SPI1
48 #define USE_EXTI
49 #define GYRO_INT_EXTI PC4
50 #define USE_MPU_DATA_READY_SIGNAL
52 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
53 #define USE_SPI_DEVICE_3
54 #define SPI3_SCK_PIN PC10
55 #define SPI3_MISO_PIN PC11
56 #define SPI3_MOSI_PIN PC12
58 // *************** M25P256 flash ********************
59 #define USE_FLASHFS
60 #define USE_FLASH_M25P16
61 #define M25P16_SPI_BUS BUS_SPI3
62 #define M25P16_CS_PIN PB3
64 // *************** OSD *****************************
65 #define USE_SPI_DEVICE_2
66 #define SPI2_SCK_PIN PB13
67 #define SPI2_MISO_PIN PB14
68 #define SPI2_MOSI_PIN PB15
70 #define USE_MAX7456
71 #define MAX7456_SPI_BUS BUS_SPI2
72 #define MAX7456_CS_PIN PB12
74 // *************** UART *****************************
75 #define USE_VCP
76 #define VBUS_SENSING_PIN PC5
77 #define VBUS_SENSING_ENABLED
79 #define USE_UART1
80 #define UART1_RX_PIN PA10
81 #define UART1_TX_PIN PA9
83 #define USE_UART3
84 #define UART3_RX_PIN PB11
85 #define UART3_TX_PIN PB10
87 #define USE_UART6
88 #define UART6_RX_PIN PC7
89 #define UART6_TX_PIN PC6
91 #define USE_SOFTSERIAL1
92 #define SOFTSERIAL_1_RX_PIN PA1
93 #define SOFTSERIAL_1_TX_PIN PC9 // PPM
95 //#define USE_SOFTSERIAL2
96 //#define SOFTSERIAL_2_RX_PIN PA2
97 //#define SOFTSERIAL_2_TX_PIN PA2
99 #define SERIAL_PORT_COUNT 5
101 #ifdef MAMBAF405
102 # define USE_UART_INVERTER
103 # define INVERTER_PIN_UART1_RX PC0
104 #endif
107 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
108 #define SERIALRX_PROVIDER SERIALRX_SBUS
109 #define SERIALRX_UART SERIAL_PORT_USART1
111 #define USE_I2C
112 #define USE_I2C_DEVICE_1
113 #define I2C1_SCL PB6
114 #define I2C1_SDA PB7
115 #define DEFAULT_I2C_BUS BUS_I2C1
117 #define USE_BARO
118 #define BARO_I2C_BUS DEFAULT_I2C_BUS
119 #define USE_BARO_BMP280
120 #define USE_BARO_MS5611
121 #define USE_BARO_BMP085
122 #define USE_BARO_DPS310
124 #define USE_MAG
125 #define MAG_I2C_BUS DEFAULT_I2C_BUS
126 #define USE_MAG_AK8963
127 #define USE_MAG_AK8975
128 #define USE_MAG_HMC5883
129 #define USE_MAG_QMC5883
130 #define USE_MAG_IST8310
131 #define USE_MAG_IST8308
132 #define USE_MAG_MAG3110
133 #define USE_MAG_LIS3MDL
135 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
136 #define BNO055_I2C_BUS DEFAULT_I2C_BUS
138 #define USE_RANGEFINDER
139 #define USE_RANGEFINDER_MSP
140 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
142 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
144 // *************** ADC *****************************
145 #define USE_ADC
146 #define ADC_INSTANCE ADC1
147 #define ADC1_DMA_STREAM DMA2_Stream0
148 #define ADC_CHANNEL_1_PIN PC1
150 #ifdef MAMBAF405
151 # define ADC_CHANNEL_2_PIN PC3
152 # define ADC_CHANNEL_3_PIN PC2
153 #else
154 # define ADC_CHANNEL_2_PIN PC2
155 # define ADC_CHANNEL_3_PIN PC3
156 #endif
158 #define VBAT_ADC_CHANNEL ADC_CHN_1
159 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
160 #define RSSI_ADC_CHANNEL ADC_CHN_3
162 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
163 #define CURRENT_METER_SCALE 179
165 #define USE_LED_STRIP
166 #define WS2811_PIN PA0
168 //#define USE_SPEKTRUM_BIND
169 //#define BIND_PIN PA3 // RX2
171 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
173 #define TARGET_IO_PORTA 0xffff
174 #define TARGET_IO_PORTB 0xffff
175 #define TARGET_IO_PORTC 0xffff
176 #define TARGET_IO_PORTD (BIT(2))
178 #define USE_DSHOT
179 #define USE_ESC_SENSOR
181 #define MAX_PWM_OUTPUT_PORTS 6
183 #define PCA9685_I2C_BUS DEFAULT_I2C_BUS