Populate unified targets as separate target folders
[betaflight.git] / src / main / target / FURYF4 / target.h
blobc7af9ac2c06734f54ca536a23ed3e5658a8a0f90
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define USE_LATE_TASK_STATISTICS
25 #ifdef FURYF4OSD
26 #define TARGET_BOARD_IDENTIFIER "FY4O"
27 #define USBD_PRODUCT_STRING "FuryF4OSD"
28 #else
29 #define TARGET_BOARD_IDENTIFIER "FYF4"
30 #define USBD_PRODUCT_STRING "FuryF4"
31 #endif
33 #define LED0_PIN PB5
34 #define LED1_PIN PB4
36 #define USE_BEEPER
37 #define BEEPER_PIN PA8
38 #define BEEPER_INVERTED
40 #define INVERTER_PIN_UART1 PC0 // PC0 used as inverter select GPIO
42 // MPU6000 interrupts
43 #define GYRO_1_EXTI_PIN PC4
45 #define GYRO_1_CS_PIN PA4
46 #define GYRO_1_SPI_INSTANCE SPI1
48 #define USE_GYRO
49 #define USE_GYRO_SPI_MPU6000
50 #define USE_GYRO_SPI_MPU6500
51 #define USE_GYRO_SPI_ICM20689
52 #define GYRO_1_ALIGN CW180_DEG
54 #define USE_ACC
55 #define USE_ACC_SPI_MPU6000
56 #define USE_ACC_SPI_MPU6500
57 #define USE_ACC_SPI_ICM20689
59 #define USE_BARO
60 #define USE_BARO_MS5611
61 #define USE_BARO_BMP280
62 #define MS5611_I2C_INSTANCE I2CDEV_1
64 #define USE_MAG
65 #define USE_MAG_HMC5883
66 #define USE_MAG_QMC5883
67 #define USE_MAG_LIS3MDL
69 #ifdef FURYF4OSD
70 #define USE_MAX7456
71 #define MAX7456_SPI_INSTANCE SPI2
72 #define MAX7456_SPI_CS_PIN PB12
74 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
76 #define DEFAULT_FEATURES FEATURE_OSD
78 #else
80 #define USE_SDCARD
81 #define USE_SDCARD_SPI
82 #define SDCARD_DETECT_INVERTED
83 #define SDCARD_DETECT_PIN PD2
84 #define SDCARD_SPI_INSTANCE SPI2
85 #define SDCARD_SPI_CS_PIN PB12
86 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
87 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
88 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
90 #endif
92 #define USE_FLASHFS
93 #define USE_FLASH_M25P16
94 #define FLASH_CS_PIN PB3
95 #define FLASH_SPI_INSTANCE SPI3
97 #define USE_VCP
98 #define USB_DETECT_PIN PC5
99 #define USE_USB_DETECT
101 #define USE_UART1
102 #define UART1_RX_PIN PA10
103 #define UART1_TX_PIN PA9
105 #define USE_UART3
106 #define UART3_RX_PIN PB11
107 #define UART3_TX_PIN PB10
109 #define USE_UART6
110 #define UART6_RX_PIN PC7
111 #define UART6_TX_PIN PC6
113 #define USE_SOFTSERIAL1
114 #define USE_SOFTSERIAL2
116 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART3, USART6, SOFTSERIAL x 2
118 #define USE_ESCSERIAL
119 #define ESCSERIAL_TIMER_TX_PIN PC9 // (HARDARE=0,PPM)
121 #define USE_SPI
123 #define USE_SPI_DEVICE_1
125 #define USE_SPI_DEVICE_2
126 #define SPI2_NSS_PIN PB12
127 #define SPI2_SCK_PIN PB13
128 #define SPI2_MISO_PIN PB14
129 #define SPI2_MOSI_PIN PB15
131 #define USE_SPI_DEVICE_3
132 #define SPI3_NSS_PIN PB3
133 #define SPI3_SCK_PIN PC10
134 #define SPI3_MISO_PIN PC11
135 #define SPI3_MOSI_PIN PC12
137 #define USE_I2C
138 #define USE_I2C_DEVICE_1
139 #define I2C_DEVICE (I2CDEV_1)
140 #define USE_I2C_PULLUP
141 #define I2C1_SCL PB6
142 #define I2C1_SDA PB7
144 #define USE_ADC
145 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
146 #define VBAT_ADC_PIN PC1
147 #define RSSI_ADC_PIN PC2
148 #define CURRENT_METER_ADC_PIN PC3
150 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
151 #define SERIALRX_UART SERIAL_PORT_USART1
152 #define SERIALRX_PROVIDER SERIALRX_SBUS
154 #define TARGET_IO_PORTA 0xffff
155 #define TARGET_IO_PORTB 0xffff
156 #define TARGET_IO_PORTC 0xffff
157 #define TARGET_IO_PORTD (BIT(2))
159 #define USABLE_TIMER_CHANNEL_COUNT 7
160 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(11) )