Removed excess trailing spaces before new lines on licenses.
[betaflight.git] / src / main / target / KROOZX / target.h
blob33018e08df51fb4001d9d531aebf0f30643dd0ef
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 CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
26 #define TARGET_XTAL_MHZ 16
28 #define USBD_PRODUCT_STRING "KroozX"
30 #define USE_TARGET_CONFIG
31 #define TARGET_PREINIT
33 #define LED0_PIN PA14 // Red LED
34 #define LED1_PIN PA13 // Green LED
36 #define USE_BEEPER
37 #define BEEPER_PIN PC1
39 #define INVERTER_PIN_UART1 PB13
40 #define INVERTER_PIN_UART6 PB12
42 #define MPU6000_CS_PIN PB2
43 #define MPU6000_SPI_INSTANCE SPI1
45 // MPU6000 interrupts
46 #define USE_EXTI
47 #define USE_MPU_DATA_READY_SIGNAL
48 #define MPU_INT_EXTI PA4
50 #define USE_GYRO
51 #define USE_GYRO_SPI_MPU6000
52 #define GYRO_MPU6000_ALIGN CW90_DEG
54 #define USE_ACC
55 #define USE_ACC_SPI_MPU6000
56 #define ACC_MPU6000_ALIGN CW270_DEG
58 #define USE_MAG
59 #define USE_MAG_HMC5883
60 #define USE_MAG_QMC5883
61 #define MAG_HMC5883_ALIGN CW180_DEG
62 #define MAG_I2C_INSTANCE I2CDEV_1
64 #define USE_BARO
65 #define USE_BARO_MS5611
67 #define USE_SDCARD
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 SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 // 328kHz
73 #define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 // 21MHz
75 #define SDCARD_DMA_CHANNEL_TX DMA1_Stream5
76 #define SDCARD_DMA_CHANNEL 0
78 #ifdef USE_MSP_DISPLAYPORT
79 #undef USE_MSP_DISPLAYPORT
80 #endif
81 #define USE_MAX7456
82 #define MAX7456_SPI_INSTANCE SPI1
83 #define MAX7456_SPI_CS_PIN PC4
84 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
85 #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
87 #define OSD_CH_SWITCH PC5
89 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
90 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
91 #define USE_ADC
92 #define ADC_INSTANCE ADC1
93 #define VBAT_ADC_PIN PC3
94 #define CURRENT_METER_ADC_PIN PC2
95 #define RSSI_ADC_PIN PC0
97 #define CURRENT_METER_SCALE_DEFAULT 1000
98 #define CURRENT_METER_OFFSET_DEFAULT 0
100 #define USE_VCP
102 #define USE_UART1
103 #define UART1_RX_PIN PA10
104 #define UART1_TX_PIN PA9
106 #define USE_UART3
107 #define UART3_RX_PIN PB11
108 #define UART3_TX_PIN PB10
110 #define USE_UART4
111 #define UART4_RX_PIN PC11
112 #define UART4_TX_PIN PC10
114 #define USE_UART5
115 #define UART5_RX_PIN PD2
116 #define UART5_TX_PIN PC12
118 #define USE_UART6
119 #define UART6_RX_PIN PC7
120 #define UART6_TX_PIN PC6
122 #define SERIAL_PORT_COUNT 6
124 #define USE_I2C
125 #define I2C_DEVICE (I2CDEV_3)
127 #define USE_I2C_DEVICE_1
128 #define I2C1_SCL PB6
129 #define I2C1_SDA PB7
131 #define USE_I2C_DEVICE_3
132 #define I2C3_SCL PA8
133 #define I2C3_SDA PC9
135 #define USE_SPI
136 #define USE_SPI_DEVICE_1
137 #define SPI1_NSS_PIN PC4
138 #define SPI1_SCK_PIN PA5
139 #define SPI1_MISO_PIN PA6
140 #define SPI1_MOSI_PIN PA7
142 #define USE_SPI_DEVICE_3
143 #define SPI3_SCK_PIN PB3
144 #define SPI3_MISO_PIN PB4
145 #define SPI3_MOSI_PIN PB5
147 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
149 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
150 #define RX_CHANNELS_TAER
151 #define DEFAULT_FEATURES (FEATURE_OSD)
153 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
155 #define TARGET_IO_PORTA 0xffff
156 #define TARGET_IO_PORTB 0xffff
157 #define TARGET_IO_PORTC 0xffff
158 #define TARGET_IO_PORTD (BIT(2))
160 #define USABLE_TIMER_CHANNEL_COUNT 10
161 #define USED_TIMERS (TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8))