vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / ATOMRCF405V2 / target.h
blob32c064f4f21e935655047d9b988bd37e83bf7575
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
26 #define TARGET_BOARD_IDENTIFIER "ARF4"
28 #define USBD_PRODUCT_STRING "AtomRCF405V2"
30 #define LED0 PC14
31 #define LED1 PB2
33 #define BEEPER PC13
34 #define BEEPER_INVERTED
37 * SPI defines
39 #define USE_SPI
41 #define USE_SPI_DEVICE_1
42 #define SPI1_SCK_PIN PA5
43 #define SPI1_MISO_PIN PA6
44 #define SPI1_MOSI_PIN PA7
46 #define USE_SPI_DEVICE_2
47 #define SPI2_SCK_PIN PB13
48 #define SPI2_MISO_PIN PB14
49 #define SPI2_MOSI_PIN PC3
51 #define USE_SPI_DEVICE_3
52 #define SPI3_SCK_PIN PC10
53 #define SPI3_MISO_PIN PC11
54 #define SPI3_MOSI_PIN PB5
57 * I2C defines
59 #define USE_I2C
60 #define DEFAULT_I2C_BUS BUS_I2C1
62 #define USE_I2C_DEVICE_1
63 #define I2C1_SCL PB8
64 #define I2C1_SDA PB9
66 //MPU6000
67 //#define USE_IMU_MPU6000
68 //#define IMU_MPU6000_ALIGN CW180_DEG
69 //#define MPU6000_SPI_BUS BUS_SPI1
70 //#define MPU6000_CS_PIN PA4
72 //BMI270
73 #define USE_IMU_BMI270
74 #define IMU_BMI270_ALIGN CW180_DEG
75 #define BMI270_SPI_BUS BUS_SPI1
76 #define BMI270_CS_PIN PA4
80 * Magnetometer
82 #define USE_MAG
83 #define MAG_I2C_BUS DEFAULT_I2C_BUS
84 #define USE_MAG_ALL
87 * Barometer
89 #define USE_BARO
90 #define BARO_I2C_BUS DEFAULT_I2C_BUS
91 #define USE_BARO_BMP280
92 #define USE_BARO_MS5611
93 #define USE_BARO_BMP085
94 #define USE_BARO_DPS310
95 #define USE_BARO_SPL06
98 * Serial ports
100 #define USE_VCP
101 #define USE_UART1
102 #define USE_UART2
103 #define USE_UART3
104 #define USE_UART4
105 #define USE_UART5
107 #define UART1_TX_PIN PA9
108 #define UART1_RX_PIN PA10
110 #define UART2_TX_PIN PA2
111 #define UART2_RX_PIN PA3
113 #define UART3_TX_PIN PB10
114 #define UART3_RX_PIN PB11
116 #define UART4_TX_PIN PA0
117 #define UART4_RX_PIN PA1
119 #define UART5_TX_PIN PC12
120 #define UART5_RX_PIN PD2
122 #define SERIAL_PORT_COUNT 6
125 * ADC
127 #define USE_ADC
128 #define ADC_INSTANCE ADC1
129 #define ADC1_DMA_STREAM DMA2_Stream4
131 #define ADC_CHANNEL_1_PIN PC0
132 #define ADC_CHANNEL_2_PIN PC1
133 #define ADC_CHANNEL_3_PIN PC2
135 #define VBAT_ADC_CHANNEL ADC_CHN_3
136 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
137 #define RSSI_ADC_CHANNEL ADC_CHN_1
139 #define CURRENT_METER_SCALE 320
142 * OSD
144 #define USE_MAX7456
145 #define MAX7456_SPI_BUS BUS_SPI3
146 #define MAX7456_CS_PIN PA15
149 * Blackbox
151 #define USE_FLASHFS
152 #define USE_FLASH_M25P16
153 #define M25P16_SPI_BUS BUS_SPI2
154 #define M25P16_CS_PIN PB12
155 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
158 * LED Strip
160 #define USE_LED_STRIP
161 #define WS2811_PIN PB6
164 * Other configs
166 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT )
167 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
168 #define SERIALRX_PROVIDER SERIALRX_SBUS
169 #define SERIALRX_UART SERIAL_PORT_USART2
171 // #define USE_RANGEFINDER
172 // #define USE_RANGEFINDER_MSP
173 // #define USE_OPFLOW
174 // #define USE_OPFLOW_MSP
176 // #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
177 // #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
178 // #define PITOT_I2C_BUS DEFAULT_I2C_BUS
180 #define USE_DSHOT
181 #define USE_ESC_SENSOR
182 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
184 #define MAX_PWM_OUTPUT_PORTS 6
186 #define TARGET_IO_PORTA 0xffff
187 #define TARGET_IO_PORTB 0xffff
188 #define TARGET_IO_PORTC 0xffff
189 #define TARGET_IO_PORTD (BIT(2))