vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / SPEEDYBEEF7V3 / target.h
blob87eeb7114f72b989246d79ab917029052bcb9aca
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 TARGET_BOARD_IDENTIFIER "SB73"
24 #define USBD_PRODUCT_STRING "SpeedyBeeF7V3"
26 #define LED0 PA14
27 #define LED1 PA13
29 #define USE_BEEPER
30 #define BEEPER PC13
31 #define BEEPER_INVERTED
33 // *************** UART *****************************
34 #define USB_IO
35 #define USE_VCP
36 // #define VBUS_SENSING_PIN PC15
37 // #define VBUS_SENSING_ENABLED
39 #define USE_PINIO
40 #define USE_PINIOBOX
41 #define PINIO1_PIN PC9
42 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
44 #define USE_UART1
45 #define UART1_RX_PIN PA10
46 #define UART1_TX_PIN PA9
48 #define USE_UART2
49 #define UART2_RX_PIN PA3
50 #define UART2_TX_PIN PA2
52 #define USE_UART3
53 #define UART3_RX_PIN PB11
54 #define UART3_TX_PIN PB10
56 #define USE_UART4
57 #define UART4_RX_PIN PA1
58 #define UART4_TX_PIN NONE
60 #define USE_UART6
61 #define UART6_RX_PIN PC7
62 #define UART6_TX_PIN PC6
64 #define SERIAL_PORT_COUNT 6
66 // *************** Gyro & ACC **********************
67 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
69 #define USE_SPI
70 #define USE_SPI_DEVICE_1
71 #define SPI1_SCK_PIN PA5
72 #define SPI1_MISO_PIN PA6
73 #define SPI1_MOSI_PIN PA7
75 #define USE_IMU_MPU6000
76 #define IMU_MPU6000_ALIGN CW270_DEG_FLIP
77 #define MPU6000_SPI_BUS BUS_SPI1
78 #define MPU6000_CS_PIN PB2
80 #define USE_IMU_BMI270
81 #define IMU_BMI270_ALIGN CW0_DEG_FLIP
82 #define BMI270_SPI_BUS BUS_SPI1
83 #define BMI270_CS_PIN PC15
85 // *************** I2C(Baro & I2C) **************************
86 #define USE_I2C
88 #define USE_I2C_DEVICE_1
89 #define I2C1_SCL PB8
90 #define I2C1_SDA PB9
92 // Baro
93 #define USE_BARO
94 #define USE_BARO_BMP280
95 #define USE_BARO_MS5611
96 #define USE_BARO_DPS310
97 #define USE_BARO_SPL06
98 #define BARO_I2C_BUS BUS_I2C1
100 // Mag
101 #define USE_MAG
102 #define MAG_I2C_BUS BUS_I2C1
103 #define USE_MAG_ALL
105 // *************** Internal SD card **************************
107 #define USE_SPI_DEVICE_3
108 #define SPI3_SCK_PIN PC10
109 #define SPI3_MISO_PIN PC11
110 #define SPI3_MOSI_PIN PC12
112 #define USE_SDCARD
113 #define USE_SDCARD_SPI
114 #define SDCARD_SPI_BUS BUS_SPI3
115 #define SDCARD_CS_PIN PD2
117 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
119 // *************** OSD *****************************
120 #define USE_OSD
121 #define USE_SPI_DEVICE_2
122 #define SPI2_SCK_PIN PB13
123 #define SPI2_MISO_PIN PB14
124 #define SPI2_MOSI_PIN PB15
126 #define USE_MAX7456
127 #define MAX7456_SPI_BUS BUS_SPI2
128 #define MAX7456_CS_PIN PB12
130 // *************** ADC *****************************
131 #define USE_ADC
132 #define ADC_CHANNEL_1_PIN PC2
133 #define ADC_CHANNEL_2_PIN PC0
134 #define ADC_CHANNEL_3_PIN PC1
136 #define VBAT_ADC_CHANNEL ADC_CHN_1
137 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
138 #define RSSI_ADC_CHANNEL ADC_CHN_2
140 // *************** LED *****************************
141 #define USE_LED_STRIP
142 #define WS2811_PIN PC8
144 // ********** Optiical Flow adn Lidar **************
145 #define USE_RANGEFINDER
146 #define USE_RANGEFINDER_MSP
147 #define RANGEFINDER_I2C_BUS BUS_I2C1
148 #define USE_OPFLOW
149 #define USE_OPFLOW_MSP
151 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
152 #define USE_DSHOT
153 #define USE_ESC_SENSOR
154 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define SERIALRX_UART SERIAL_PORT_USART2
157 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
158 #define SERIALRX_PROVIDER SERIALRX_SBUS
160 #define MAX_PWM_OUTPUT_PORTS 8
162 #define CURRENT_METER_SCALE 490
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))