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/>.
19 #define TARGET_BOARD_IDENTIFIER "BJF4"
21 #define USBD_PRODUCT_STRING "BlueJayF4"
23 #define USE_HARDWARE_REVISION_DETECTION
26 #define BOARD_HAS_VOLTAGE_DIVIDER
33 #define BEEPER_OPT PB7
34 #define BEEPER_INVERTED
37 #define MPU6500_CS_PIN PC4
38 #define MPU6500_SPI_BUS BUS_SPI1
39 #define USE_IMU_MPU6500
40 #define IMU_MPU6500_ALIGN CW0_DEG
43 #define MAG_I2C_BUS BUS_I2C1
46 #define TEMPERATURE_I2C_BUS BUS_I2C1
49 #define BARO_I2C_BUS BUS_I2C1
50 #define USE_BARO_BMP085
51 #define USE_BARO_BMP280
52 #define USE_BARO_MS5611
55 #define USE_SDCARD_SPI
56 #define SDCARD_DETECT_INVERTED
57 #define SDCARD_DETECT_PIN PD2
58 #define SDCARD_SPI_BUS BUS_SPI3
59 #define SDCARD_CS_PIN PA15
61 #define M25P16_CS_PIN PB7
62 #define M25P16_SPI_BUS BUS_SPI3
65 #define USE_FLASH_M25P16
68 //#define VBUS_SENSING_PIN PA8
69 //#define VBUS_SENSING_ENABLED
71 #define USE_UART_INVERTER
74 #define UART1_RX_PIN PA10
75 #define UART1_TX_PIN PA9
76 //#define INVERTER_PIN_UART1_TX PC9
79 #define UART3_RX_PIN PB11
80 #define UART3_TX_PIN PB10
83 #define UART6_RX_PIN PC7
84 #define UART6_TX_PIN PC6
85 #define INVERTER_PIN_UART6_RX PB15
87 #define USE_SOFTSERIAL1
88 #define SERIAL_PORT_COUNT 5
90 #define SOFTSERIAL_1_RX_PIN PB1
91 #define SOFTSERIAL_1_TX_PIN PB0
95 #define ESCSERIAL_TIMER_TX_HARDWARE 0
99 #define USE_SPI_DEVICE_1
100 #define SPI1_NSS_PIN PC4
101 #define SPI1_SCK_PIN PA5
102 #define SPI1_MISO_PIN PA6
103 #define SPI1_MOSI_PIN PA7
105 #define USE_SPI_DEVICE_3
106 #define SPI3_NSS_PIN PB3
107 #define SPI3_SCK_PIN PC10
108 #define SPI3_MISO_PIN PC11
109 #define SPI3_MOSI_PIN PC12
112 #define USE_I2C_DEVICE_1
113 #define USE_I2C_PULLUP
116 #define ADC_CHANNEL_1_PIN PC3
117 #define VBAT_ADC_CHANNEL ADC_CHN_1
119 #define USE_LED_STRIP
120 #define WS2811_PIN PB1
122 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
124 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
125 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
127 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
129 #define USE_SPEKTRUM_BIND
130 #define BIND_PIN PB11
132 // Number of available PWM outputs
133 #define MAX_PWM_OUTPUT_PORTS 6
135 #define TARGET_IO_PORTA 0xffff
136 #define TARGET_IO_PORTB 0xffff
137 #define TARGET_IO_PORTC 0xffff
138 #define TARGET_IO_PORTD (BIT(2))