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 #define TARGET_BOARD_IDENTIFIER "KROOZX"
25 #define TARGET_XTAL_MHZ 16
27 #define USBD_PRODUCT_STRING "KroozX"
29 #define USE_TARGET_CONFIG
31 #define LED0_PIN PA14 // Red LED
32 #define LED1_PIN PA13 // Green LED
35 #define BEEPER_PIN PC1
37 #define INVERTER_PIN_UART1 PB13
38 #define INVERTER_PIN_UART6 PB12
40 #define GYRO_1_CS_PIN PB2
41 #define GYRO_1_SPI_INSTANCE SPI1
45 #define USE_MPU_DATA_READY_SIGNAL
46 // disable GYRO_EXTI when MAX7456 is on same SPI bus as gyro
47 // #define USE_GYRO_EXTI
48 #define GYRO_1_EXTI_PIN PA4
51 #define USE_GYRO_SPI_MPU6000
52 #define GYRO_1_ALIGN CW90_DEG
55 #define USE_ACC_SPI_MPU6000
58 #define USE_MAG_HMC5883
59 #define USE_MAG_QMC5883
60 #define MAG_HMC5883_ALIGN CW180_DEG
61 #define MAG_I2C_INSTANCE I2CDEV_1
64 #define USE_BARO_MS5611
67 #define USE_SDCARD_SPI
68 #define SDCARD_DETECT_INVERTED
69 #define SDCARD_DETECT_PIN PC13
70 #define SDCARD_SPI_INSTANCE SPI3
71 #define SDCARD_SPI_CS_PIN PA15
72 #define SPI3_TX_DMA_OPT 0 // DMA 1 Stream 5 Channel 0
74 #undef USE_MSP_DISPLAYPORT
77 #define MAX7456_SPI_INSTANCE SPI1
78 #define MAX7456_SPI_CS_PIN PC4
80 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
81 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
83 #define ADC_INSTANCE ADC1
84 #define ADC1_DMA_OPT 1 // DMA 2 Stream 4 Channel 0 (compat default)
85 #define VBAT_ADC_PIN PC3
86 #define CURRENT_METER_ADC_PIN PC2
87 #define RSSI_ADC_PIN PC0
89 #define CURRENT_METER_SCALE_DEFAULT 1000
90 #define CURRENT_METER_OFFSET_DEFAULT 0
95 #define UART1_RX_PIN PA10
96 #define UART1_TX_PIN PA9
99 #define UART3_RX_PIN PB11
100 #define UART3_TX_PIN PB10
103 #define UART4_RX_PIN PC11
104 #define UART4_TX_PIN PC10
107 #define UART5_RX_PIN PD2
108 #define UART5_TX_PIN PC12
111 #define UART6_RX_PIN PC7
112 #define UART6_TX_PIN PC6
114 #define SERIAL_PORT_COUNT 6
117 #define I2C_DEVICE (I2CDEV_3)
119 #define USE_I2C_DEVICE_1
123 #define USE_I2C_DEVICE_3
128 #define USE_SPI_DEVICE_1
129 #define SPI1_NSS_PIN PC4
130 #define SPI1_SCK_PIN PA5
131 #define SPI1_MISO_PIN PA6
132 #define SPI1_MOSI_PIN PA7
134 #define USE_SPI_DEVICE_3
135 #define SPI3_SCK_PIN PB3
136 #define SPI3_MISO_PIN PB4
137 #define SPI3_MOSI_PIN PB5
139 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
141 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
142 #define RX_CHANNELS_TAER
143 #define DEFAULT_FEATURES (FEATURE_OSD)
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD (BIT(2))
150 #define USABLE_TIMER_CHANNEL_COUNT 10
151 #define USED_TIMERS (TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8))