vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FLYWOOF411 / target.h
blobed263d5ee3d0ee1ac32b661708d4f1982971f15b
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 FLYWOOF411_V2
21 #define TARGET_BOARD_IDENTIFIER "FW42"
22 #define USBD_PRODUCT_STRING "FLYWOOF411V2"
23 #else
24 #define TARGET_BOARD_IDENTIFIER "FW41"
25 #define USBD_PRODUCT_STRING "FLYWOOF411"
26 #endif
28 #define LED0 PC13
30 #define BEEPER PC14
31 #define BEEPER_INVERTED
34 // *************** SPI **********************
35 #define USE_SPI
36 #define USE_SPI_DEVICE_1
37 #define SPI1_SCK_PIN PA5
38 #define SPI1_MISO_PIN PA6
39 #define SPI1_MOSI_PIN PA7
41 #define USE_SPI_DEVICE_2
42 #define SPI2_SCK_PIN PB13
43 #define SPI2_MISO_PIN PB14
44 #define SPI2_MOSI_PIN PB15
47 // *************** SPI Gyro & ACC **********************
49 #define USE_IMU_MPU6000
50 #define MPU6000_CS_PIN PA4
51 #define MPU6000_SPI_BUS BUS_SPI1
52 #define IMU_MPU6000_ALIGN CW180_DEG
54 #define USE_IMU_ICM20689
55 #define ICM20689_CS_PIN PA4
56 #define ICM20689_SPI_BUS BUS_SPI1
57 #define IMU_ICM20689_ALIGN CW180_DEG
59 // *************** Baro *****************************
61 #define USE_I2C
62 #define USE_I2C_DEVICE_1
63 #define I2C1_SCL PB8
64 #define I2C1_SDA PB9
66 #define USE_BARO
67 #define BARO_I2C_BUS BUS_I2C1
68 #define USE_BARO_BMP280
69 #define USE_BARO_MS5611
71 #define USE_MAG
72 #define MAG_I2C_BUS BUS_I2C1
73 #define USE_MAG_ALL
75 // *************** SPI OSD *****************************
76 #define USE_MAX7456
77 #define MAX7456_SPI_BUS BUS_SPI2
78 #define MAX7456_CS_PIN PB12
80 // *************** SPI FLASH **************************
81 #define USE_FLASHFS
82 #define USE_FLASH_M25P16
83 #define M25P16_CS_PIN PB2
84 #define M25P16_SPI_BUS BUS_SPI2
85 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
87 // *************** UART *****************************
88 #define USE_VCP
90 #define USE_UART1
91 #ifdef FLYWOOF411_V2
92 #define UART1_TX_PIN PA9
93 #define UART1_RX_PIN PA10
94 #else
95 #define UART1_TX_PIN PB6
96 #define UART1_RX_PIN PB7
97 #endif
99 #define USE_UART2
100 #ifdef FLYWOOF411_V2
101 #define UART2_TX_PIN PA2
102 #else
103 #define UART2_TX_PIN NONE //PA2
104 #endif
105 #define UART2_RX_PIN PA3
107 #define USE_SOFTSERIAL1
108 #ifdef FLYWOOF411_V2
109 #define SOFTSERIAL_1_TX_PIN PB6 // Clash with TX2, possible to use as S.Port or VTX control
110 #define SOFTSERIAL_1_RX_PIN PB7
111 #else
112 #define SOFTSERIAL_1_TX_PIN PA2 // Clash with TX2, possible to use as S.Port or VTX control
113 #define SOFTSERIAL_1_RX_PIN PA2
114 #endif
116 #define SERIAL_PORT_COUNT 4 // VCP, USART1, USART2, SS1
118 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
119 #define SERIALRX_PROVIDER SERIALRX_SBUS
120 #ifdef FLYWOOF411_V2
121 #define SERIALRX_UART SERIAL_PORT_USART1
122 #else
123 #define SERIALRX_UART SERIAL_PORT_USART2
124 #endif
125 // *************** ADC *****************************
126 #define USE_ADC
127 #define ADC_INSTANCE ADC1
128 #define ADC_CHANNEL_1_PIN PA1
129 #ifdef FLYWOOF411_V2
130 #define ADC_CHANNEL_2_PIN PB1
131 #define ADC_CHANNEL_3_PIN PB0
132 #else
133 #define ADC_CHANNEL_2_PIN PA0
134 #define ADC_CHANNEL_3_PIN PB1
135 #endif
137 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
138 #define VBAT_ADC_CHANNEL ADC_CHN_2
139 #define RSSI_ADC_CHANNEL ADC_CHN_3
141 // *************** LED2812 ************************
142 #define USE_LED_STRIP
143 #ifdef FLYWOOF411_V2
144 #define WS2811_PIN PA0
145 #else
146 #define WS2811_PIN PA15
147 #endif
148 // *************** OTHERS *************************
149 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
151 #define USE_DSHOT
152 #define USE_ESC_SENSOR
153 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
155 #define TARGET_IO_PORTA 0xffff
156 #define TARGET_IO_PORTB 0xffff
157 #define TARGET_IO_PORTC 0xffff
158 #define TARGET_IO_PORTD (BIT(2))
160 #ifdef FLYWOOF411_V2
161 #define MAX_PWM_OUTPUT_PORTS 6
162 #else
163 #define MAX_PWM_OUTPUT_PORTS 4
164 #endif