Create release.yml
[betaflight.git] / src / main / target / KROOZX / target.h
blob99ca3ac0c5b63d17b1f0276bbc3a93c58a55e003
1 /*
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)
8 * any later version.
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/>.
21 #pragma once
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
34 #define USE_BEEPER
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
43 // MPU6000 interrupts
44 #define USE_EXTI
45 #define USE_MPU_DATA_READY_SIGNAL
46 #define USE_GYRO_EXTI
47 #define GYRO_1_EXTI_PIN PA4
49 #define USE_GYRO
50 #define USE_GYRO_SPI_MPU6000
51 #define GYRO_1_ALIGN CW90_DEG
53 #define USE_ACC
54 #define USE_ACC_SPI_MPU6000
56 #define USE_MAG
57 #define USE_MAG_HMC5883
58 #define USE_MAG_QMC5883
59 #define MAG_HMC5883_ALIGN CW180_DEG
60 #define MAG_I2C_INSTANCE I2CDEV_1
62 #define USE_BARO
63 #define USE_BARO_MS5611
65 #define USE_SDCARD
66 #define USE_SDCARD_SPI
67 #define SDCARD_DETECT_INVERTED
68 #define SDCARD_DETECT_PIN PC13
69 #define SDCARD_SPI_INSTANCE SPI3
70 #define SDCARD_SPI_CS_PIN PA15
71 #define SPI3_TX_DMA_OPT 0 // DMA 1 Stream 5 Channel 0
73 #undef USE_MSP_DISPLAYPORT
75 #define USE_MAX7456
76 #define MAX7456_SPI_INSTANCE SPI1
77 #define MAX7456_SPI_CS_PIN PC4
79 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
80 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
81 #define USE_ADC
82 #define ADC_INSTANCE ADC1
83 #define ADC1_DMA_OPT 1 // DMA 2 Stream 4 Channel 0 (compat default)
84 #define VBAT_ADC_PIN PC3
85 #define CURRENT_METER_ADC_PIN PC2
86 #define RSSI_ADC_PIN PC0
88 #define CURRENT_METER_SCALE_DEFAULT 1000
89 #define CURRENT_METER_OFFSET_DEFAULT 0
91 #define USE_VCP
93 #define USE_UART1
94 #define UART1_RX_PIN PA10
95 #define UART1_TX_PIN PA9
97 #define USE_UART3
98 #define UART3_RX_PIN PB11
99 #define UART3_TX_PIN PB10
101 #define USE_UART4
102 #define UART4_RX_PIN PC11
103 #define UART4_TX_PIN PC10
105 #define USE_UART5
106 #define UART5_RX_PIN PD2
107 #define UART5_TX_PIN PC12
109 #define USE_UART6
110 #define UART6_RX_PIN PC7
111 #define UART6_TX_PIN PC6
113 #define SERIAL_PORT_COUNT 6
115 #define USE_I2C
116 #define I2C_DEVICE (I2CDEV_3)
118 #define USE_I2C_DEVICE_1
119 #define I2C1_SCL PB6
120 #define I2C1_SDA PB7
122 #define USE_I2C_DEVICE_3
123 #define I2C3_SCL PA8
124 #define I2C3_SDA PC9
126 #define USE_SPI
127 #define USE_SPI_DEVICE_1
128 #define SPI1_NSS_PIN PC4
129 #define SPI1_SCK_PIN PA5
130 #define SPI1_MISO_PIN PA6
131 #define SPI1_MOSI_PIN PA7
133 #define USE_SPI_DEVICE_3
134 #define SPI3_SCK_PIN PB3
135 #define SPI3_MISO_PIN PB4
136 #define SPI3_MOSI_PIN PB5
138 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
140 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
141 #define RX_CHANNELS_TAER
142 #define DEFAULT_FEATURES (FEATURE_OSD)
144 #define TARGET_IO_PORTA 0xffff
145 #define TARGET_IO_PORTB 0xffff
146 #define TARGET_IO_PORTC 0xffff
147 #define TARGET_IO_PORTD (BIT(2))
149 #define USABLE_TIMER_CHANNEL_COUNT 10
150 #define USED_TIMERS (TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8))