vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FLYWOOF405S_AIO / target.h
blob4250943633e68e73d666460335f10c3fdcba7044
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 #define TARGET_BOARD_IDENTIFIER "F4SA"
21 #define USBD_PRODUCT_STRING "FLYWOOF405S_AIO"
24 #define LED0 PC14 //Green
25 #define BEEPER PC13
26 #define BEEPER_INVERTED
28 // *************** SPI1 Gyro & ACC *******************
29 #define USE_SPI
30 #define USE_SPI_DEVICE_1
32 #define SPI1_SCK_PIN PA5
33 #define SPI1_MISO_PIN PA6
34 #define SPI1_MOSI_PIN PA7
36 #define USE_IMU_MPU6000
37 #define IMU_MPU6000_ALIGN CW270_DEG
38 #define MPU6000_CS_PIN PB12
39 #define MPU6000_SPI_BUS BUS_SPI1
41 #define USE_IMU_BMI270
42 #define IMU_BMI270_ALIGN CW270_DEG
43 #define BMI270_CS_PIN PB12
44 #define BMI270_SPI_BUS BUS_SPI1
46 #define USE_IMU_ICM42605
47 #define IMU_ICM42605_ALIGN CW270_DEG
48 #define ICM42605_CS_PIN PB12
49 #define ICM42605_SPI_BUS BUS_SPI1
51 #define USE_EXTI
52 #define GYRO_INT_EXTI PB13
53 #define USE_MPU_DATA_READY_SIGNAL
55 // *************** I2C /Baro/Mag *********************
56 #define USE_I2C
57 #define USE_I2C_DEVICE_1
58 #define I2C1_SCL PB8
59 #define I2C1_SDA PB9
61 #define USE_BARO
62 #define BARO_I2C_BUS BUS_I2C1
63 #define USE_BARO_BMP280
64 #define USE_BARO_MS5611
65 #define USE_BARO_BMP085
66 #define USE_BARO_DPS310
67 #define USE_BARO_SPL06
69 #define USE_MAG
70 #define MAG_I2C_BUS BUS_I2C1
71 #define USE_MAG_ALL
73 #define USE_RANGEFINDER
74 #define USE_RANGEFINDER_HCSR04_I2C
75 #define RANGEFINDER_I2C_BUS BUS_I2C1
76 #define PITOT_I2C_BUS BUS_I2C1
77 #define TEMPERATURE_I2C_BUS BUS_I2C1
81 // *************** SPI2 OSD ***************************
82 #define USE_SPI_DEVICE_3
83 #define SPI3_SCK_PIN PC10
84 #define SPI3_MISO_PIN PC11
85 #define SPI3_MOSI_PIN PC12
87 #define USE_OSD
88 #define USE_MAX7456
89 #define MAX7456_SPI_BUS BUS_SPI3
90 #define MAX7456_CS_PIN PB14//
92 // *************** Onboard flash ********************
94 #define USE_FLASHFS
95 #define USE_FLASH_M25P16
96 #define M25P16_CS_PIN PB3
97 #define M25P16_SPI_BUS BUS_SPI3
99 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
102 // *************** UART *****************************
103 #define USB_IO
104 #define USE_VCP
105 #define VBUS_SENSING_PIN PA8
106 #define VBUS_SENSING_ENABLED
108 #define USE_UART1
109 #define UART1_TX_PIN PB6
110 #define UART1_RX_PIN PA10
112 #define USE_UART2
113 #define UART2_TX_PIN PD5
114 #define UART2_RX_PIN PD6
116 #define USE_UART3
117 #define UART3_TX_PIN PB10
118 #define UART3_RX_PIN PB11
120 #define USE_UART4
121 #define UART4_TX_PIN PA0
122 #define UART4_RX_PIN PA1
124 #define USE_UART5
125 #define UART5_TX_PIN NONE
126 #define UART5_RX_PIN PD2
128 #define USE_UART6
129 #define UART6_TX_PIN PC6
130 #define UART6_RX_PIN PC7
132 #define SERIAL_PORT_COUNT 7
134 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
135 #define SERIALRX_PROVIDER SERIALRX_SBUS
136 #define SERIALRX_UART SERIAL_PORT_USART3
139 // *************** ADC ***************************
140 #define USE_ADC
141 #define ADC_INSTANCE ADC1
142 #define ADC1_DMA_STREAM DMA2_Stream0
143 #define ADC_CHANNEL_1_PIN PC3
144 #define ADC_CHANNEL_2_PIN PC2
145 #define ADC_CHANNEL_3_PIN PC0
146 #define VBAT_ADC_CHANNEL ADC_CHN_1
147 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
148 #define RSSI_ADC_CHANNEL ADC_CHN_3
150 // *************** LED2812 ************************
151 #define USE_LED_STRIP
152 #define WS2811_PIN PA9
154 // *************** OTHERS *************************
155 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
156 #define CURRENT_METER_SCALE 250
158 #define USE_DSHOT
159 #define USE_ESC_SENSOR
161 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
163 #define TARGET_IO_PORTA 0xffff
164 #define TARGET_IO_PORTB 0xffff
165 #define TARGET_IO_PORTC 0xffff
166 #define TARGET_IO_PORTD 0x0064
168 #define MAX_PWM_OUTPUT_PORTS 8