vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FLYWOOF405PRO / target.h
bloba5a02c5fe84b1918b0bb52aff6c05471e90a77d3
1 /*
2 * This file is part of INAV.
4 * INAV 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 * INAV 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 INAV. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #ifdef FLYWOOF405PRO
21 #define TARGET_BOARD_IDENTIFIER "F4PR"
22 #define USBD_PRODUCT_STRING "FLYWOOF405PRO"
23 #else
24 #define TARGET_BOARD_IDENTIFIER "F4HD"
25 #define USBD_PRODUCT_STRING "FLYWOOF405HD"
26 #endif
28 #define LED0 PC14 //Green
29 #define BEEPER PC13
30 #define BEEPER_INVERTED
32 // *************** SPI1 Gyro & ACC *******************
33 #define USE_SPI
34 #define USE_SPI_DEVICE_1
36 #define SPI1_SCK_PIN PA5
37 #define SPI1_MISO_PIN PA6
38 #define SPI1_MOSI_PIN PA7
40 #define USE_IMU_MPU6000
41 #define IMU_MPU6000_ALIGN CW90_DEG
42 #define MPU6000_CS_PIN PB12
43 #define MPU6000_SPI_BUS BUS_SPI1
45 #define USE_IMU_BMI270
46 #define IMU_BMI270_ALIGN CW180_DEG_FLIP
47 #define BMI270_CS_PIN PB12
48 #define BMI270_SPI_BUS BUS_SPI1
50 #define USE_IMU_ICM42605
51 #define IMU_ICM42605_ALIGN CW180_DEG_FLIP
52 #define ICM42605_CS_PIN PB12
53 #define ICM42605_SPI_BUS BUS_SPI1
55 #define USE_EXTI
56 #define GYRO_INT_EXTI PB13
57 #define USE_MPU_DATA_READY_SIGNAL
59 // *************** I2C /Baro/Mag *********************
60 #define USE_I2C
61 #define USE_I2C_DEVICE_1
62 #define I2C1_SCL PB8
63 #define I2C1_SDA PB9
65 #define USE_BARO
66 #define BARO_I2C_BUS BUS_I2C1
67 #define USE_BARO_BMP280
68 #define USE_BARO_MS5611
69 #define USE_BARO_BMP085
70 #define USE_BARO_DPS310
71 #define USE_BARO_SPL06
73 #define USE_MAG
74 #define MAG_I2C_BUS BUS_I2C1
75 #define USE_MAG_ALL
77 #define USE_RANGEFINDER
78 #define USE_RANGEFINDER_HCSR04_I2C
79 #define RANGEFINDER_I2C_BUS BUS_I2C1
80 #define PITOT_I2C_BUS BUS_I2C1
81 #define TEMPERATURE_I2C_BUS BUS_I2C1
85 // *************** SPI2 OSD ***************************
86 #define USE_SPI_DEVICE_3
87 #define SPI3_SCK_PIN PC10
88 #define SPI3_MISO_PIN PC11
89 #define SPI3_MOSI_PIN PC12
91 #ifdef FLYWOOF405PRO
92 #define USE_OSD
93 #define USE_MAX7456
94 #define MAX7456_SPI_BUS BUS_SPI3
95 #define MAX7456_CS_PIN PB14
96 #endif
97 // *************** Onboard flash ********************
99 #define USE_FLASHFS
100 #define USE_FLASH_M25P16
101 #define M25P16_CS_PIN PB3
102 #define M25P16_SPI_BUS BUS_SPI3
104 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
107 // *************** UART *****************************
108 #define USB_IO
109 #define USE_VCP
110 #define VBUS_SENSING_PIN PA8
111 #define VBUS_SENSING_ENABLED
113 #define USE_UART1
114 #define UART1_TX_PIN PB6
115 #define UART1_RX_PIN PA10
117 #define USE_UART2
118 #define UART2_TX_PIN PD5
119 #define UART2_RX_PIN PD6
121 #define USE_UART3
122 #define UART3_TX_PIN PB10
123 #define UART3_RX_PIN PB11
125 #define USE_UART4
126 #define UART4_TX_PIN PA0
127 #define UART4_RX_PIN PA1
129 #define USE_UART5
130 #define UART5_TX_PIN NONE
131 #define UART5_RX_PIN PD2
133 #define USE_UART6
134 #define UART6_TX_PIN PC6
135 #define UART6_RX_PIN PC7
137 #define SERIAL_PORT_COUNT 7
139 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
140 #define SERIALRX_PROVIDER SERIALRX_SBUS
141 #define SERIALRX_UART SERIAL_PORT_USART3
144 // *************** ADC ***************************
145 #define USE_ADC
146 #define ADC_INSTANCE ADC1
147 #define ADC1_DMA_STREAM DMA2_Stream0
148 #define ADC_CHANNEL_1_PIN PC3
149 #define ADC_CHANNEL_2_PIN PC2
150 #define ADC_CHANNEL_3_PIN PC0
151 #define VBAT_ADC_CHANNEL ADC_CHN_1
152 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
153 #define RSSI_ADC_CHANNEL ADC_CHN_3
155 // *************** LED2812 ************************
156 #define USE_LED_STRIP
157 #define WS2811_PIN PA9
159 // *************** OTHERS *************************
160 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
161 #define CURRENT_METER_SCALE 250
163 #define USE_DSHOT
164 #define USE_ESC_SENSOR
166 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
168 #define TARGET_IO_PORTA 0xffff
169 #define TARGET_IO_PORTB 0xffff
170 #define TARGET_IO_PORTC 0xffff
171 #define TARGET_IO_PORTD 0xffff
173 #define MAX_PWM_OUTPUT_PORTS 8