vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FURYF4OSD / target.h
blob71abc9a8c68d82b3111454e6767a4b0aef1d7cbc
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 // ICM42605/ICM42688P
49 #define USE_IMU_ICM42605
50 #define IMU_ICM42605_ALIGN CW180_DEG
51 #define ICM42605_SPI_BUS BUS_SPI1
52 #define ICM42605_CS_PIN PA4
54 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
55 #define USE_SPI_DEVICE_3
56 #define SPI3_SCK_PIN PC10
57 #define SPI3_MISO_PIN PC11
58 #define SPI3_MOSI_PIN PC12
60 // *************** M25P256 flash ********************
61 #define USE_FLASHFS
62 #define USE_FLASH_M25P16
63 #define M25P16_SPI_BUS BUS_SPI3
64 #define M25P16_CS_PIN PB3
66 // *************** OSD *****************************
67 #define USE_SPI_DEVICE_2
68 #define SPI2_SCK_PIN PB13
69 #define SPI2_MISO_PIN PB14
70 #define SPI2_MOSI_PIN PB15
72 #define USE_MAX7456
73 #define MAX7456_SPI_BUS BUS_SPI2
74 #define MAX7456_CS_PIN PB12
76 // *************** UART *****************************
77 #define USE_VCP
78 #define VBUS_SENSING_PIN PC5
79 #define VBUS_SENSING_ENABLED
81 #define USE_UART1
82 #define UART1_RX_PIN PA10
83 #define UART1_TX_PIN PA9
85 #define USE_UART3
86 #define UART3_RX_PIN PB11
87 #define UART3_TX_PIN PB10
89 #define USE_UART6
90 #define UART6_RX_PIN PC7
91 #define UART6_TX_PIN PC6
93 #define USE_SOFTSERIAL1
94 #define SOFTSERIAL_1_RX_PIN PA1
95 #define SOFTSERIAL_1_TX_PIN PC9 // PPM
97 //#define USE_SOFTSERIAL2
98 //#define SOFTSERIAL_2_RX_PIN PA2
99 //#define SOFTSERIAL_2_TX_PIN PA2
101 #define SERIAL_PORT_COUNT 5
103 #ifdef MAMBAF405
104 # define USE_UART_INVERTER
105 # define INVERTER_PIN_UART1_RX PC0
106 #endif
109 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
110 #define SERIALRX_PROVIDER SERIALRX_SBUS
111 #define SERIALRX_UART SERIAL_PORT_USART1
113 #define USE_I2C
114 #define USE_I2C_DEVICE_1
115 #define I2C1_SCL PB6
116 #define I2C1_SDA PB7
117 #define DEFAULT_I2C_BUS BUS_I2C1
119 #define USE_BARO
120 #define BARO_I2C_BUS DEFAULT_I2C_BUS
121 #define USE_BARO_ALL
123 #define USE_MAG
124 #define MAG_I2C_BUS DEFAULT_I2C_BUS
125 #define USE_MAG_ALL
127 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
129 #define USE_RANGEFINDER
130 #define USE_RANGEFINDER_MSP
131 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
133 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
135 // *************** ADC *****************************
136 #define USE_ADC
137 #define ADC_INSTANCE ADC1
138 #define ADC1_DMA_STREAM DMA2_Stream0
139 #define ADC_CHANNEL_1_PIN PC1
141 #ifdef MAMBAF405
142 # define ADC_CHANNEL_2_PIN PC3
143 # define ADC_CHANNEL_3_PIN PC2
144 #else
145 # define ADC_CHANNEL_2_PIN PC2
146 # define ADC_CHANNEL_3_PIN PC3
147 #endif
149 #define VBAT_ADC_CHANNEL ADC_CHN_1
150 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
151 #define RSSI_ADC_CHANNEL ADC_CHN_3
153 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
154 #define CURRENT_METER_SCALE 179
156 #define USE_LED_STRIP
157 #define WS2811_PIN PA0
159 //#define USE_SPEKTRUM_BIND
160 //#define BIND_PIN PA3 // RX2
162 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
164 #define TARGET_IO_PORTA 0xffff
165 #define TARGET_IO_PORTB 0xffff
166 #define TARGET_IO_PORTC 0xffff
167 #define TARGET_IO_PORTD (BIT(2))
169 #define USE_DSHOT
170 #define USE_ESC_SENSOR
172 #define MAX_PWM_OUTPUT_PORTS 6