add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / COLIBRI / target.h
bloba99cf0cbcd728193b58b5bd6f72506171a52cfbd
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "COLI"
22 #ifdef QUANTON
23 #define USBD_PRODUCT_STRING "Quanton"
24 #else
25 #define USBD_PRODUCT_STRING "Colibri"
26 #endif
27 #ifdef OPBL
28 #define USBD_SERIALNUMBER_STRING "0x8020000"
29 #endif
31 #define PLL_M 16
32 #define PLL_N 336
34 #define LED0 PC14
35 #define LED1 PC13
37 #define BEEPER PC5
39 #define MPU6000_CS_PIN PC4
40 #define MPU6000_SPI_BUS BUS_SPI1
42 #define USE_IMU_MPU6000
44 // MPU6000 interrupts
45 #define USE_EXTI
46 #define GYRO_INT_EXTI PC0
47 #define USE_MPU_DATA_READY_SIGNAL
49 #define USE_MAG
50 #define MAG_I2C_BUS BUS_I2C3
51 #define USE_MAG_HMC5883
52 #define USE_MAG_QMC5883
53 #define USE_MAG_IST8310
54 #define USE_MAG_IST8308
55 #define USE_MAG_MAG3110
56 #define USE_MAG_LIS3MDL
58 #define TEMPERATURE_I2C_BUS BUS_I2C3
59 #define BNO055_I2C_BUS BUS_I2C3
61 #ifdef QUANTON
62 #define IMU_MPU6000_ALIGN CW90_DEG
63 #else
64 #define IMU_MPU6000_ALIGN CW270_DEG_FLIP
65 #endif
67 #define USE_BARO
68 #define BARO_I2C_BUS BUS_I2C3
69 #define USE_BARO_MS5611
71 #define M25P16_CS_PIN PB12
72 #define M25P16_SPI_BUS BUS_SPI2
74 #define USE_FLASHFS
75 #define USE_FLASH_M25P16
77 #define USE_VCP
78 #define VBUS_SENSING_PIN PA9
80 #define USE_UART_INVERTER
82 #define USE_UART1
83 #define UART1_RX_PIN PB7
84 #define UART1_TX_PIN PB6
85 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
87 #define USE_UART2
88 #define UART2_RX_PIN PA3
89 #define UART2_TX_PIN PA2
90 #define INVERTER_PIN_UART2_RX PB2 // PB2 used as inverter select GPIO
92 #define USE_UART3
93 #define UART3_RX_PIN PB11
94 #define UART3_TX_PIN PB10
96 #define USE_UART4
97 #define UART4_RX_PIN PC11
98 #define UART4_TX_PIN PC10
100 #define USE_UART5
101 #define UART5_RX_PIN PD2
102 #define UART5_TX_PIN PC12
104 #define SERIAL_PORT_COUNT 6 //VCP, UART1, UART2, UART3, UART4, UART5
106 #define USE_SPI
108 #define USE_SPI_DEVICE_1
109 #define SPI1_NSS_PIN PC4
110 #define SPI1_SCK_PIN PA5
111 #define SPI1_MISO_PIN PA6
112 #define SPI1_MOSI_PIN PA7
114 #define USE_SPI_DEVICE_2
115 #define SPI2_NSS_PIN PB12
116 #define SPI2_SCK_PIN PB13
117 #define SPI2_MISO_PIN PC2
118 #define SPI2_MOSI_PIN PC3
120 #define USE_I2C
121 #define USE_I2C_DEVICE_3
122 #define I2C3_SCL PA8
123 #define I2C3_SDA PC9
125 #define USE_RANGEFINDER
126 #define RANGEFINDER_I2C_BUS BUS_I2C3
128 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
130 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
131 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
133 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
135 #define TARGET_IO_PORTA 0xffff
136 #define TARGET_IO_PORTB 0xffff
137 #define TARGET_IO_PORTC 0xffff
138 #define TARGET_IO_PORTD 0xffff
140 #define MAX_PWM_OUTPUT_PORTS 15