2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #if defined(CRAZYBEEF3FS)
24 #define TARGET_BOARD_IDENTIFIER "CBFS"
25 #define USBD_PRODUCT_STRING "CrazyBee F3 FS"
26 #elif defined(CRAZYBEEF3DX)
27 #define TARGET_BOARD_IDENTIFIER "CBDX"
28 #define USBD_PRODUCT_STRING "CrazyBee F3 DX"
30 #define TARGET_BOARD_IDENTIFIER "CBFR"
31 #define USBD_PRODUCT_STRING "CrazyBee F3 FR"
34 #undef USE_SERIALRX_CRSF
35 #undef USE_SERIALRX_GHST
36 #undef USE_SERIALRX_SUMD
37 #undef USE_SERIALRX_SUMH
38 #undef USE_SERIALRX_XBUS
39 #undef USE_TELEMETRY_CRSF
40 #undef USE_TELEMETRY_GHST
41 #undef USE_TELEMETRY_MAVLINK
45 #if defined(CRAZYBEEF3FS)
46 #undef USE_SERIALRX_SBUS
47 #undef USE_SERIALRX_FPORT
48 #undef USE_SERIALRX_SPEKTRUM
49 #undef USE_TELEMETRY_FRSKY_HUB
50 #undef USE_TELEMETRY_SMARTPORT
51 #undef USE_TELEMETRY_SRXL
52 #elif defined(CRAZYBEEF3DX)
53 #undef USE_SERIALRX_SBUS
54 #undef USE_SERIALRX_FPORT
55 #undef USE_SERIALRX_IBUS
56 #undef USE_TELEMETRY_FRSKY_HUB
57 #undef USE_TELEMETRY_SMARTPORT
59 #undef USE_SERIALRX_SPEKTRUM
60 #undef USE_SERIALRX_IBUS
61 #undef USE_TELEMETRY_SRXL
64 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
68 #define BEEPER_PIN PC15
69 #define BEEPER_INVERTED
73 #define GYRO_1_EXTI_PIN PC13
74 #define USE_MPU_DATA_READY_SIGNAL
75 #define GYRO_1_SPI_INSTANCE SPI1
76 #define GYRO_1_CS_PIN PA4
78 #define USE_GYRO_SPI_MPU6000
79 #define GYRO_1_ALIGN CW90_DEG
81 #define USE_ACC_SPI_MPU6000
84 #if defined(CRAZYBEEF3DX)
87 #define SERIAL_PORT_COUNT 3
88 #define UART2_TX_PIN PA14
89 #define UART2_RX_PIN PA15
90 #define UART3_TX_PIN PB10
91 #define UART3_RX_PIN PB11
94 #define SERIAL_PORT_COUNT 2
95 #define UART3_TX_PIN PB10
96 #define UART3_RX_PIN PB11
100 #define USE_SPI_DEVICE_1
101 #define SPI1_NSS_PIN PA4
102 #define SPI1_SCK_PIN PA5
103 #define SPI1_MISO_PIN PA6
104 #define SPI1_MOSI_PIN PA7
106 #define USE_SPI_DEVICE_2
107 #define SPI2_NSS_PIN PB12
108 #define SPI2_SCK_PIN PB13
109 #define SPI2_MISO_PIN PB14
110 #define SPI2_MOSI_PIN PB15
112 #if defined(CRAZYBEEF3FS)
114 #define USE_RX_FLYSKY
115 #define RX_CHANNELS_AETR
116 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
117 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_A7105_FLYSKY_2A
118 #define FLYSKY_2A_CHANNEL_COUNT 14
119 #define RX_SPI_INSTANCE SPI2
120 #define RX_NSS_PIN SPI2_NSS_PIN
121 #define RX_SPI_EXTI_PIN PA8
122 #define RX_SPI_BIND_PIN PA9
123 #define RX_SPI_LED_PIN PA10
124 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_MOTOR_STOP)
125 #elif defined(CRAZYBEEF3DX)
126 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
127 #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048
128 #define SERIALRX_UART SERIAL_PORT_USART3
129 #define RX_CHANNELS_TAER
130 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_MOTOR_STOP)
133 #define USE_RX_FRSKY_SPI_D
134 #define USE_RX_FRSKY_SPI_X
135 #define USE_RX_SFHSS_SPI
136 #define USE_RX_REDPINE_SPI
137 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
138 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_FRSKY_X
139 #define USE_RX_FRSKY_SPI_TELEMETRY
141 #define RX_SPI_INSTANCE SPI2
142 #define RX_NSS_PIN SPI2_NSS_PIN
143 #define RX_SPI_EXTI_PIN PA8
144 #define RX_SPI_LED_PIN PA10
145 #define RX_SPI_BIND_PIN PA9
146 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_MOTOR_STOP)
150 #define MAX7456_SPI_INSTANCE SPI1
151 #define MAX7456_SPI_CS_PIN PB1
154 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
155 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
156 #define VBAT_ADC_PIN PA0
157 #define CURRENT_METER_ADC_PIN PA1
158 #define ADC_INSTANCE ADC1
159 #define CURRENT_METER_SCALE_DEFAULT 2350
161 #define TARGET_IO_PORTA 0xffff
162 #define TARGET_IO_PORTB 0xffff
163 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
164 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
165 #define USABLE_TIMER_CHANNEL_COUNT 6
166 #define USED_TIMERS (TIM_N(2) |TIM_N(3) |TIM_N(4) | TIM_N(8))