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/>.
20 #define TARGET_BOARD_IDENTIFIER "SBF7"
21 #define USBD_PRODUCT_STRING "SpeedyBeeF7"
26 #define BEEPER_INVERTED
31 #define VBUS_SENSING_PIN PC15
32 #define VBUS_SENSING_ENABLED
35 #define UART1_RX_PIN PA10
36 #define UART1_TX_PIN PA9
39 #define UART2_RX_PIN PA3
40 #define UART2_TX_PIN PA2
43 #define UART3_RX_PIN PC11
44 #define UART3_TX_PIN PC10
47 #define UART4_RX_PIN PA1
48 #define UART4_TX_PIN PA0
51 #define UART5_RX_PIN PD2
52 #define UART5_TX_PIN PC12
54 #define SERIAL_PORT_COUNT 6
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
73 #define USE_SPI_DEVICE_2
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
83 #define USE_SPI_DEVICE_3
85 #define M25P16_CS_PIN PC0
86 #define M25P16_SPI_BUS BUS_SPI3
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
98 #define USE_BARO_BMP280
99 #define BARO_I2C_BUS BUS_I2C1
101 #define USE_I2C_DEVICE_1
105 // External I2C Pads -- I2C2
106 #define USE_I2C_DEVICE_2
107 #define I2C2_SCL PB10
108 #define I2C2_SDA PB11
111 #define MAG_I2C_BUS BUS_I2C2
112 #define USE_MAG_HMC5883
113 #define USE_MAG_QMC5883
114 #define USE_MAG_IST8310
115 #define USE_MAG_IST8308
116 #define USE_MAG_MAG3110
117 #define USE_MAG_LIS3MDL
119 #define TEMPERATURE_I2C_BUS BUS_I2C2
120 #define PITOT_I2C_BUS BUS_I2C2
122 #define USE_RANGEFINDER
123 #define RANGEFINDER_I2C_BUS BUS_I2C2
127 #define ADC_CHANNEL_1_PIN PC2
128 #define ADC_CHANNEL_2_PIN PC1
129 #define ADC_CHANNEL_3_PIN PC3
131 #define VBAT_ADC_CHANNEL ADC_CHN_1
132 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
133 #define RSSI_ADC_CHANNEL ADC_CHN_3
135 // PINIO to disable BT
138 #define PINIO1_PIN PA15
139 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
142 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
144 #define USE_ESC_SENSOR
145 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
147 #define SERIALRX_UART SERIAL_PORT_USART2
148 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
149 #define SERIALRX_PROVIDER SERIALRX_SBUS
151 #define MAX_PWM_OUTPUT_PORTS 6
153 #define CURRENT_METER_SCALE 102
156 #define TARGET_IO_PORTA 0xffff
157 #define TARGET_IO_PORTB 0xffff
158 #define TARGET_IO_PORTC 0xffff
159 #define TARGET_IO_PORTD (BIT(2))