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 #define TARGET_BOARD_IDENTIFIER "CC3D" // CopterControl 3D
22 #define INVERTER PB2 // PB2 (BOOT1) used as inverter select GPIO
23 #define INVERTER_USART USART1
26 #define BEEPER_OPT PA2
29 #define MPU_INT_EXTI PA3
30 #define USE_MPU_DATA_READY_SIGNAL
31 //#define DEBUG_MPU_DATA_READY_INTERRUPT
34 #define USE_SPI_DEVICE_1
35 #define USE_SPI_DEVICE_2
38 #define I2C_DEVICE (I2CDEV_2) // Flex port - SCL/PB10, SDA/PB11
40 #define MPU6000_CS_GPIO GPIOA
41 #define MPU6000_CS_PIN PA4
42 #define MPU6000_SPI_INSTANCE SPI1
44 #define M25P16_CS_GPIO GPIOB
45 #define M25P16_CS_PIN PB12
46 #define M25P16_SPI_INSTANCE SPI2
49 #define USE_FLASH_M25P16
52 #define USE_GYRO_SPI_MPU6000
53 #define GYRO_MPU6000_ALIGN CW270_DEG
56 #define USE_ACC_SPI_MPU6000
57 #define ACC_MPU6000_ALIGN CW270_DEG
60 #define USE_MPU_DATA_READY_SIGNAL
64 #define USE_BARO_MS5611
65 #define USE_BARO_BMP085
66 #define USE_BARO_BMP280
70 #define USE_MAG_HMC5883
75 #define USE_SOFTSERIAL1
76 #define SERIAL_PORT_COUNT 4
78 #ifdef USE_UART1_RX_DMA
79 #undef USE_UART1_RX_DMA
82 #define SOFTSERIAL_1_TIMER TIM3
83 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 1 // PWM 2
84 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 2 // PWM 3
86 #define UART3_RX_PIN PB11
87 #define UART3_TX_PIN PB10
90 #define CURRENT_METER_ADC_PIN PB1
91 #define VBAT_ADC_PIN PA0
92 #define RSSI_ADC_PIN PB0
95 #define WS2811_PIN PB4
96 #define WS2811_TIMER TIM3
97 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC6
98 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH6_HANDLER
100 #define SPEKTRUM_BIND
101 // USART3, PB11 (Flexport)
102 #define BIND_PIN PB11
104 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
107 //#define SONAR_ECHO_PIN PB0
108 //#define SONAR_TRIGGER_PIN PB5
111 #define CLI_MINIMAL_VERBOSITY
115 #define SKIP_CLI_COMMAND_HELP
116 #define SKIP_PID_FLOAT
119 #undef USE_SOFTSERIAL1
121 #define SKIP_PID_FLOAT
124 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
126 // IO - from schematics
127 #define TARGET_IO_PORTA 0xffff
128 #define TARGET_IO_PORTB 0xffff
129 #define TARGET_IO_PORTC ( BIT(14) )
131 #define USABLE_TIMER_CHANNEL_COUNT 12
132 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) )