vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / AIRBOTF7 / target.h
blobaffa3ed4351a9c131f6c2fc9a54f505ebe5bae72
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 // ************** Beeper and LED ******************
28 #define LED0 PB12
29 #define BEEPER PB0
30 #define BEEPER_INVERTED
32 // *************** SPI & I2C **********************
33 #define USE_SPI
34 #define USE_I2C
36 #define USE_SPI_DEVICE_3
37 #define SPI3_SCK_PIN PB3
38 #define SPI3_MISO_PIN PB4
39 #define SPI3_MOSI_PIN PB5
41 #define USE_SPI_DEVICE_2
42 #define SPI2_SCK_PIN PB13
43 #define SPI2_MISO_PIN PB14
44 #define SPI2_MOSI_PIN PB15
46 #define USE_SPI_DEVICE_1
47 #define SPI1_SCK_PIN PA5
48 #define SPI1_MISO_PIN PA6
49 #define SPI1_MOSI_PIN PA7
51 #define USE_I2C_DEVICE_1
52 #define I2C1_SCL PB8
53 #define I2C1_SDA PB9
55 #ifdef OMNIBUSF7NANOV7
56 # include "target_o7v7.h"
57 #else
58 # include "target_abf7.h"
59 #endif
61 // *************** OSD *****************************
62 #define USE_MAX7456
63 #define MAX7456_SPI_BUS BUS_SPI2
64 #define MAX7456_CS_PIN PC15
66 // *************** I2C defvices **********************
67 #define USE_BARO
68 #define BARO_I2C_BUS BUS_I2C1
69 #define USE_BARO_BMP280
71 #define USE_MAG
72 #define MAG_I2C_BUS BUS_I2C1
73 #define USE_MAG_ALL
75 #define TEMPERATURE_I2C_BUS BUS_I2C1
76 #define PITOT_I2C_BUS BUS_I2C1
78 #define USE_RANGEFINDER
79 #define RANGEFINDER_I2C_BUS BUS_I2C1
81 // *************** UART *****************************
82 #define USE_VCP
84 #define USE_UART1
85 #define UART1_RX_PIN PA10
86 #define UART1_TX_PIN PA9
88 #define USE_UART2
89 #define UART2_TX_PIN PA2
90 #define UART2_RX_PIN NONE
92 #define USE_UART3
93 #define UART3_RX_PIN PC11
94 #define UART3_TX_PIN PC10
96 #define USE_UART4
97 #define UART4_RX_PIN PA1
98 #define UART4_TX_PIN PA0
100 #define USE_UART5
101 #define UART5_TX_PIN PC12
102 #define UART5_RX_PIN NONE
104 #define USE_UART6
105 #define UART6_RX_PIN PC7
106 #define UART6_TX_PIN PC6
108 #define USE_SOFTSERIAL1
109 #define SOFTSERIAL_1_TX_PIN PA5
110 #define SOFTSERIAL_1_RX_PIN PA5
112 #define SERIAL_PORT_COUNT 8
114 // ************** Other features *******************
115 #define USE_LED_STRIP
116 #define WS2811_PIN PA15
118 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
120 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
121 #define SERIALRX_PROVIDER SERIALRX_SBUS
122 #define SERIALRX_UART SERIAL_PORT_USART1
124 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
126 #define MAX_PWM_OUTPUT_PORTS 4
127 #define TARGET_MOTOR_COUNT 4
129 #define TARGET_IO_PORTA 0xffff
130 #define TARGET_IO_PORTB 0xffff
131 #define TARGET_IO_PORTC 0xffff
132 #define TARGET_IO_PORTD 0xffff
134 #define USE_DSHOT
135 #define USE_ESC_SENSOR