First wave of feature cut conversions: CHEBUZZF3, MIDELICF3, and SPRACINGF3EVO.
[betaflight.git] / src / main / target / COLIBRI / target.h
blob865cd1a4f99fca09479774e6825bda56e179474c
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 "COLI"
25 #define USBD_PRODUCT_STRING "Colibri"
26 #ifdef OPBL
27 #define USBD_SERIALNUMBER_STRING "0x8020000"
28 #endif
30 #define TARGET_XTAL_MHZ 16
32 #define LED0_PIN PC14
33 #define LED1_PIN PC13
35 #define USE_BEEPER
36 #define BEEPER_PIN PC5
38 #define INVERTER_PIN_UART2 PB2 // PB2 used as inverter select GPIO
40 #define GYRO_1_CS_PIN PC4
41 #define GYRO_1_SPI_INSTANCE SPI1
43 #define USE_ACC
44 #define USE_ACC_SPI_MPU6000
45 #define ACC_1_ALIGN CW270_DEG_FLIP
47 #define USE_GYRO
48 #define USE_GYRO_SPI_MPU6000
49 #define GYRO_1_ALIGN CW270_DEG_FLIP
51 // MPU6000 interrupts
52 #define USE_EXTI
53 #define USE_GYRO_EXTI
54 #define GYRO_1_EXTI_PIN PC0
55 #define USE_MPU_DATA_READY_SIGNAL
57 #define USE_MAG
58 #define USE_MAG_HMC5883
59 #define USE_MAG_QMC5883
60 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
62 #define MAG_INT_EXTI PC1
63 #define USE_MAG_DATA_READY_SIGNAL
64 #define ENSURE_MAG_DATA_READY_IS_HIGH
66 #define USE_BARO
67 #define USE_BARO_MS5611
69 #define FLASH_CS_PIN PB12
70 #define FLASH_SPI_INSTANCE SPI2
72 #define USE_FLASHFS
73 #define USE_FLASH_M25P16
76 #define USE_VCP
77 #define USE_USB_DETECT
78 #define USB_DETECT_PIN PA9
80 #define USE_UART1
81 #define UART1_RX_PIN PB7
82 #define UART1_TX_PIN PB6
84 #define USE_UART2
85 #define UART2_RX_PIN PA3
86 #define UART2_TX_PIN PA2
88 #define USE_UART3
89 #define UART3_RX_PIN PB11
90 #define UART3_TX_PIN PB10
92 //#define USE_UART4
93 #define UART4_RX_PIN PC11
94 #define UART4_TX_PIN PC10
96 //#define USE_UART5
97 #define UART5_RX_PIN PD2
98 #define UART5_TX_PIN PC12
100 #define USE_SOFTSERIAL1
101 #define USE_SOFTSERIAL2
103 #define SERIAL_PORT_COUNT 6 //VCP, UART1, UART2, UART3, SOFTSERIAL x 2
105 #define USE_ESCSERIAL
106 #define ESCSERIAL_TIMER_TX_PIN PA10 // (HARDARE=0,PPM)
108 #define USE_SPI
110 #define USE_SPI_DEVICE_1
111 #define SPI1_NSS_PIN PC4
112 #define SPI1_SCK_PIN PA5
113 #define SPI1_MISO_PIN PA6
114 #define SPI1_MOSI_PIN PA7
116 #define USE_SPI_DEVICE_2
117 #define SPI2_NSS_PIN PB12
118 #define SPI2_SCK_PIN PB13
119 #define SPI2_MISO_PIN PC2
120 #define SPI2_MOSI_PIN PC3
122 #define USE_I2C
123 #define USE_I2C_DEVICE_3
124 #define I2C_DEVICE (I2CDEV_3)
125 #define I2C3_SCL PA8
126 #define I2C3_SDA PC9
128 // alternative defaults for Colibri/Gemini target
129 #define USE_TARGET_CONFIG
131 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
133 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
135 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
137 #define TARGET_IO_PORTA 0xffff
138 #define TARGET_IO_PORTB 0xffff
139 #define TARGET_IO_PORTC 0xffff
140 #define TARGET_IO_PORTD 0xffff
142 #define USABLE_TIMER_CHANNEL_COUNT 17
143 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(10) | TIM_N(11))