Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / ATOMRCF405NAVI_DELUX / target.h
blobf04a5d5da6fcfd2664b3dc16e1bf13f2ea0c3afa
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 "AT4D"
28 #define USBD_PRODUCT_STRING "AtomRCF405NAVI_DELUX"
30 #define LED0 PA13
31 #define LED1 PA14
33 #define BEEPER PB2
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 PC2
49 #define SPI2_MOSI_PIN PC3
51 #define USE_SPI_DEVICE_3
52 #define SPI3_SCK_PIN PB3
53 #define SPI3_MISO_PIN PB4
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 //ICM42688-P
67 #define USE_IMU_ICM42605
68 #define IMU_ICM42605_ALIGN CW270_DEG
69 #define ICM42605_CS_PIN PA4
70 #define ICM42605_SPI_BUS BUS_SPI1
73 * Magnetometer
75 #define USE_MAG
76 #define MAG_I2C_BUS DEFAULT_I2C_BUS
77 #define USE_MAG_ALL
80 * Barometer
82 #define USE_BARO
83 #define BARO_I2C_BUS DEFAULT_I2C_BUS
84 #define USE_BARO_ALL
87 * Serial ports
89 #define USE_VCP
90 #define USE_UART1
91 #define USE_UART2
92 #define USE_UART3
93 #define USE_UART4
94 #define USE_UART5
95 #define USE_UART6
97 #define UART1_TX_PIN PA9
98 #define UART1_RX_PIN PA10
100 #define UART2_TX_PIN PA2
101 #define UART2_RX_PIN PA3
103 #define UART3_TX_PIN PC10
104 #define UART3_RX_PIN PC11
106 #define UART4_TX_PIN PA0
107 #define UART4_RX_PIN PA1
109 #define UART5_TX_PIN PC12
110 #define UART5_RX_PIN PD2
112 #define UART6_TX_PIN PC6
113 #define UART6_RX_PIN PC7
115 #define SERIAL_PORT_COUNT 7
118 * ADC
120 #define USE_ADC
121 #define ADC_INSTANCE ADC1
122 #define ADC1_DMA_STREAM DMA2_Stream0
124 #define ADC_CHANNEL_1_PIN PC0
125 #define ADC_CHANNEL_2_PIN PC1
126 #define ADC_CHANNEL_3_PIN PC4
127 #define ADC_CHANNEL_4_PIN PC5
129 #define VBAT_ADC_CHANNEL ADC_CHN_1
130 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
131 #define RSSI_ADC_CHANNEL ADC_CHN_3
132 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
134 #define CURRENT_METER_SCALE 128
137 * OSD
139 #define USE_MAX7456
140 #define MAX7456_SPI_BUS BUS_SPI2
141 #define MAX7456_CS_PIN PB12
144 * SD Card
146 #define USE_SDCARD
147 #define USE_SDCARD_SPI
148 #define SDCARD_SPI_BUS BUS_SPI3
149 #define SDCARD_CS_PIN PC14
150 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
153 * LED Strip
155 #define USE_LED_STRIP
156 #define WS2811_PIN PA8
159 * Other configs
161 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT )
162 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
163 #define SERIALRX_PROVIDER SERIALRX_SBUS
164 #define SERIALRX_UART SERIAL_PORT_USART2
166 #define USE_RANGEFINDER
167 #define USE_RANGEFINDER_MSP
168 #define USE_OPFLOW
169 #define USE_OPFLOW_MSP
171 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
172 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
173 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
175 #define USE_DSHOT
176 #define USE_ESC_SENSOR
177 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
179 #define MAX_PWM_OUTPUT_PORTS 11
181 #define TARGET_IO_PORTA 0xffff
182 #define TARGET_IO_PORTB 0xffff
183 #define TARGET_IO_PORTC 0xffff
184 #define TARGET_IO_PORTD (BIT(2))
186 #define USE_PINIO
187 #define USE_PINIOBOX
188 #define PINIO1_PIN PC15
189 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED