Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / IFLIGHT_BLITZ_ATF435 / target.h
blob19f1483dfeb9c181c8eaf5236d0d5dc997bbf877
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 "IAT4"
29 #define USBD_PRODUCT_STRING "iFlight BLITZ ATF435"
31 #define LED0 PC15
33 #define BEEPER PB2
34 #define BEEPER_INVERTED
37 // Buses
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 PB15
51 #define USE_SPI_DEVICE_3
52 #define SPI3_SCK_PIN PB3
53 #define SPI3_MISO_PIN PB4
54 #define SPI3_MOSI_PIN PB5
56 #define USE_I2C
57 #define USE_I2C_DEVICE_1
58 #define I2C1_SCL PB8
59 #define I2C1_SDA PB9
60 // #define USE_I2C_PULLUP
62 #define DEFAULT_I2C_BUS BUS_I2C1
64 // Gyro
66 // BMI270
67 #define USE_IMU_BMI270
68 #define IMU_BMI270_ALIGN CW0_DEG
69 #define BMI270_SPI_BUS BUS_SPI1
70 #define BMI270_CS_PIN PA4
72 // ICM42605/ICM42688P
73 #define USE_IMU_ICM42605
74 #define IMU_ICM42605_ALIGN CW0_DEG
75 #define ICM42605_SPI_BUS BUS_SPI1
76 #define ICM42605_CS_PIN PA4
79 // Other sensors
81 #define USE_BARO
82 #define BARO_I2C_BUS DEFAULT_I2C_BUS
83 #define USE_BARO_ALL
85 #define USE_MAG
86 #define MAG_I2C_BUS DEFAULT_I2C_BUS
87 #define USE_MAG_ALL
89 // OSD
90 #define USE_MAX7456
91 #define MAX7456_SPI_BUS BUS_SPI2
92 #define MAX7456_CS_PIN PB12
94 // Flash
96 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
97 #define USE_FLASHFS
98 #define USE_FLASH_M25P16
99 #define M25P16_SPI_BUS BUS_SPI3
100 #define M25P16_CS_PIN PA15
102 #define USE_FLASH_W25N01G
103 #define W25N01G_SPI_BUS BUS_SPI3
104 #define W25N01G_CS_PIN PA15
106 // UARTs
107 #define USE_VCP
108 // #define USB_DETECT_PIN PC5
109 // #define USE_USB_DETECT
111 #define USE_UART1
112 #define UART1_RX_PIN PA10
113 #define UART1_TX_PIN PA9
115 #define USE_UART2
116 #define UART2_RX_PIN PA3
117 #define UART2_TX_PIN PA2
119 #define USE_UART3
120 #define UART3_RX_PIN PC11
121 #define UART3_TX_PIN PC10
123 #define USE_UART4
124 #define UART4_RX_PIN PA1
125 #define UART4_TX_PIN PA0
127 #define USE_UART5
128 #define UART5_RX_PIN PD2
129 #define UART5_TX_PIN PC12
131 #define USE_UART6
132 #define UART6_RX_PIN PC7
133 #define UART6_TX_PIN PC6
135 #define SERIAL_PORT_COUNT 7
137 // *************** ADC *****************************
138 #define USE_ADC
139 #define ADC_INSTANCE ADC1
141 #define ADC1_DMA_STREAM DMA2_CHANNEL5
143 #define ADC_CHANNEL_1_PIN PC2
144 #define ADC_CHANNEL_2_PIN PC1
146 #define VBAT_ADC_CHANNEL ADC_CHN_1
147 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
149 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
151 #define USE_LED_STRIP
152 #define WS2811_PIN PA8
154 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define TARGET_IO_PORTA 0xffff
157 #define TARGET_IO_PORTB 0xffff
158 #define TARGET_IO_PORTC 0xffff
159 #define TARGET_IO_PORTD 0xffff
160 #define TARGET_IO_PORTE BIT(2)
162 #define MAX_PWM_OUTPUT_PORTS 8
163 #define USE_DSHOT
164 #define USE_ESC_SENSOR