Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / SPEEDYBEEF7 / target.h
blob032f7479b5ba0b869aed28f9b9b5169cd65c978a
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "SBF7"
21 #define USBD_PRODUCT_STRING "SpeedyBeeF7"
23 #define LED0 PC14
25 #define BEEPER PC13
26 #define BEEPER_INVERTED
28 // UARTs
29 #define USB_IO
30 #define USE_VCP
31 #define VBUS_SENSING_PIN PC15
32 #define VBUS_SENSING_ENABLED
34 #define USE_UART1
35 #define UART1_RX_PIN PA10
36 #define UART1_TX_PIN PA9
38 #define USE_UART2
39 #define UART2_RX_PIN PA3
40 #define UART2_TX_PIN PA2
42 #define USE_UART3
43 #define UART3_RX_PIN PC11
44 #define UART3_TX_PIN PC10
46 #define USE_UART4
47 #define UART4_RX_PIN PA1
48 #define UART4_TX_PIN PA0
50 #define USE_UART5
51 #define UART5_RX_PIN PD2
52 #define UART5_TX_PIN PC12
54 #define SERIAL_PORT_COUNT 6
56 // GYRO -- SPI1
57 #define USE_SPI
58 #define USE_SPI_DEVICE_1
62 #define USE_IMU_ICM20689
63 #define IMU_ICM20689_ALIGN CW0_DEG
65 #define ICM20689_CS_PIN PA4
66 #define ICM20689_SPI_BUS BUS_SPI1
68 #define SPI1_SCK_PIN PA5
69 #define SPI1_MISO_PIN PA6
70 #define SPI1_MOSI_PIN PA7
72 // OSD -- SPI2
73 #define USE_SPI_DEVICE_2
74 #define USE_MAX7456
75 #define MAX7456_SPI_BUS BUS_SPI2
76 #define MAX7456_CS_PIN PB12
78 #define SPI2_SCK_PIN PB13
79 #define SPI2_MISO_PIN PB14
80 #define SPI2_MOSI_PIN PB15
82 // Onboard 32MB Flash
83 #define USE_SPI_DEVICE_3
85 #define M25P16_CS_PIN PC0
86 #define M25P16_SPI_BUS BUS_SPI3
87 #define USE_FLASHFS
88 #define USE_FLASH_M25P16
89 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
91 #define SPI3_SCK_PIN PB3
92 #define SPI3_MISO_PIN PB4
93 #define SPI3_MOSI_PIN PB5
95 // Onboard BMP280 Baro --- I2C1
96 #define USE_I2C
97 #define USE_BARO
98 #define USE_BARO_BMP280
99 #define BARO_I2C_BUS BUS_I2C1
101 #define USE_I2C_DEVICE_1
102 #define I2C1_SCL PB8
103 #define I2C1_SDA PB9
105 // External I2C Pads -- I2C2
106 #define USE_I2C_DEVICE_2
107 #define I2C2_SCL PB10
108 #define I2C2_SDA PB11
110 #define USE_MAG
111 #define MAG_I2C_BUS BUS_I2C2
112 #define USE_MAG_ALL
114 #define TEMPERATURE_I2C_BUS BUS_I2C2
115 #define PITOT_I2C_BUS BUS_I2C2
117 #define USE_RANGEFINDER
118 #define RANGEFINDER_I2C_BUS BUS_I2C2
120 // ADC
121 #define USE_ADC
122 #define ADC_CHANNEL_1_PIN PC2
123 #define ADC_CHANNEL_2_PIN PC1
124 #define ADC_CHANNEL_3_PIN PC3
126 #define VBAT_ADC_CHANNEL ADC_CHN_1
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
128 #define RSSI_ADC_CHANNEL ADC_CHN_3
130 // PINIO to disable BT
131 #define USE_PINIO
132 #define USE_PINIOBOX
133 #define PINIO1_PIN PA15
134 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
136 // FC Default Config
137 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
138 #define USE_DSHOT
139 #define USE_ESC_SENSOR
140 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
142 #define SERIALRX_UART SERIAL_PORT_USART2
143 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
144 #define SERIALRX_PROVIDER SERIALRX_SBUS
146 #define MAX_PWM_OUTPUT_PORTS 6
148 #define CURRENT_METER_SCALE 102
150 // Used Pins
151 #define TARGET_IO_PORTA 0xffff
152 #define TARGET_IO_PORTB 0xffff
153 #define TARGET_IO_PORTC 0xffff
154 #define TARGET_IO_PORTD (BIT(2))