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 "B411"
21 #define USBD_PRODUCT_STRING "BETAFPVF411"
26 #define BEEPER_INVERTED
28 // *************** SPI **********************
30 #define USE_SPI_DEVICE_1
31 #define SPI1_SCK_PIN PA5
32 #define SPI1_MISO_PIN PA6
33 #define SPI1_MOSI_PIN PA7
35 #define USE_SPI_DEVICE_2
36 #define SPI2_SCK_PIN PB13
37 #define SPI2_MISO_PIN PB14
38 #define SPI2_MOSI_PIN PB15
40 // *************** SPI Gyro & ACC **********************
41 #define USE_IMU_MPU6000
42 #define MPU6000_CS_PIN PA4
43 #define MPU6000_SPI_BUS BUS_SPI1
44 #define IMU_MPU6000_ALIGN CW180_DEG
46 #define USE_IMU_BMI270
47 #define IMU_BMI270_ALIGN CW90_DEG
48 #define BMI270_SPI_BUS BUS_SPI1
49 #define BMI270_CS_PIN PA4
51 // *************** Baro *****************************
54 #define USE_I2C_DEVICE_1
59 #define BARO_I2C_BUS BUS_I2C1
63 #define MAG_I2C_BUS BUS_I2C1
66 // *************** SPI OSD *****************************
68 #define MAX7456_SPI_BUS BUS_SPI2
69 #define MAX7456_CS_PIN PB12
71 // *************** SPI FLASH **************************
73 #define USE_FLASH_M25P16
74 #define M25P16_CS_PIN PB2
75 #define M25P16_SPI_BUS BUS_SPI2
76 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
78 // *************** UART *****************************
82 #define UART1_TX_PIN PA9
83 #define UART1_RX_PIN PA10
86 #define UART2_TX_PIN PA2
87 #define UART2_RX_PIN PA3
89 #define USE_SOFTSERIAL1
90 #define SOFTSERIAL_1_TX_PIN PB3
91 #define SOFTSERIAL_1_RX_PIN PB3
93 #define USE_SOFTSERIAL2
94 #define SOFTSERIAL_2_TX_PIN PB10
95 #define SOFTSERIAL_2_RX_PIN PB10
97 #define SERIAL_PORT_COUNT 5
99 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
100 #define SERIALRX_PROVIDER SERIALRX_CRSF
101 #define SERIALRX_UART SERIAL_PORT_USART1
103 // *************** ADC *****************************
105 #define ADC_INSTANCE ADC1
106 #define ADC_CHANNEL_1_PIN PB0
107 #define ADC_CHANNEL_2_PIN PB1
109 #define VBAT_ADC_CHANNEL ADC_CHN_1
110 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
112 #define VBAT_SCALE_DEFAULT 1100
114 // *************** LED2812 ************************
115 #define USE_LED_STRIP
116 #define WS2811_PIN PA8
118 // *************** OTHERS *************************
119 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_BLACKBOX)
122 #define USE_ESC_SENSOR
123 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
125 #define TARGET_IO_PORTA 0xffff
126 #define TARGET_IO_PORTB 0xffff
127 #define TARGET_IO_PORTC 0xffff
128 #define TARGET_IO_PORTD 0xffff
130 #define MAX_PWM_OUTPUT_PORTS 4