vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / SPEEDYBEEF405V3 / target.h
blob6653ea56c0cd79ea453720c4f3f91c19d1223ff7
1 /*
2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
25 #pragma once
27 #define TARGET_BOARD_IDENTIFIER "SB43"
28 #define USBD_PRODUCT_STRING "SpeedyBeeF405V3"
30 /*** Indicators ***/
31 #define LED0 PC8
32 #define BEEPER PC5
33 #define BEEPER_INVERTED
35 #define USE_PINIO
36 #define USE_PINIOBOX
37 #define PINIO1_PIN PC3
38 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
40 // *************** UART *****************************
41 #define USB_IO
42 #define USE_VCP
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 PC11
54 #define UART3_TX_PIN PC10
56 #define USE_UART4
57 #define UART4_RX_PIN PA1
58 #define UART4_TX_PIN PA0
60 #define USE_UART5
61 #define UART5_RX_PIN PD2
62 #define UART5_TX_PIN PC12
64 #define USE_UART6
65 #define UART6_RX_PIN PC7
66 #define UART6_TX_PIN PC6
68 #define SERIAL_PORT_COUNT 7
70 // *************** Gyro & ACC **********************
71 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
73 #define USE_SPI
74 #define USE_SPI_DEVICE_1
75 #define SPI1_SCK_PIN PA5
76 #define SPI1_MISO_PIN PA6
77 #define SPI1_MOSI_PIN PA7
79 #define USE_IMU_BMI270
80 #define IMU_BMI270_ALIGN CW0_DEG
81 #define BMI270_SPI_BUS BUS_SPI1
82 #define BMI270_CS_PIN PA4
84 // *************** I2C(Baro & I2C) **************************
85 #define USE_I2C
86 #define DEFAULT_I2C_BUS BUS_I2C2
88 #define USE_I2C_DEVICE_2
89 #define I2C1_SCL PB10
90 #define I2C1_SDA PB11
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_I2C2
100 // Mag
101 #define USE_MAG
102 #define MAG_I2C_BUS BUS_I2C2
103 #define USE_MAG_ALL
105 // *************** Internal SD card **************************
106 #define USE_SPI_DEVICE_2
107 #define SPI2_SCK_PIN PB13
108 #define SPI2_MISO_PIN PB14
109 #define SPI2_MOSI_PIN PB15
111 #define USE_SDCARD
112 #define USE_SDCARD_SPI
113 #define SDCARD_SPI_BUS BUS_SPI2
114 #define SDCARD_CS_PIN PA15
116 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
118 // *************** OSD *****************************
119 #define USE_OSD
121 #define USE_MAX7456
122 #define MAX7456_SPI_BUS BUS_SPI2
123 #define MAX7456_CS_PIN PB12
125 // *************** ADC *****************************
126 #define USE_ADC
127 #define ADC_CHANNEL_1_PIN PC0
128 #define ADC_CHANNEL_2_PIN PC1
129 #define ADC_CHANNEL_3_PIN PC2
131 #define VBAT_ADC_CHANNEL ADC_CHN_1
132 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
133 #define RSSI_ADC_CHANNEL ADC_CHN_3
135 // *************** LED *****************************
136 #define USE_LED_STRIP
137 #define WS2811_PIN PC9
139 // ********** Optiical Flow adn Lidar **************
140 #define USE_RANGEFINDER
141 #define USE_RANGEFINDER_MSP
142 #define USE_OPFLOW
143 #define USE_OPFLOW_MSP
145 #define TEMPERATURE_I2C_BUS BUS_I2C2
146 #define PITOT_I2C_BUS BUS_I2C2
147 #define RANGEFINDER_I2C_BUS BUS_I2C2
149 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
150 #define USE_DSHOT
151 #define USE_DSHOT_DMAR
152 // #define USE_ESC_SENSOR
153 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
155 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
156 #define SERIALRX_PROVIDER SERIALRX_SBUS
158 #define MAX_PWM_OUTPUT_PORTS 9
160 #define CURRENT_METER_SCALE 386
162 #define TARGET_IO_PORTA 0xffff
163 #define TARGET_IO_PORTB 0xffff
164 #define TARGET_IO_PORTC 0xffff
165 #define TARGET_IO_PORTD (BIT(2))