Disable certain features on some targets to fit in FLASH
[betaflight.git] / src / main / target / CC3D / target.h
blobd94fbb8e9a3acbbd61989790c46b339d0e293c6b
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 #define TARGET_BOARD_IDENTIFIER "CC3D" // CopterControl 3D
20 #define LED0_GPIO GPIOB
21 #define LED0_PIN Pin_3 // PB3 (LED)
22 #define LED0_PERIPHERAL RCC_APB2Periph_GPIOB
23 #define LED0
25 #define INVERTER_PIN Pin_2 // PB2 (BOOT1) used as inverter select GPIO
26 #define INVERTER_GPIO GPIOB
27 #define INVERTER_PERIPHERAL RCC_APB2Periph_GPIOB
28 #define INVERTER_USART USART1
30 #define BEEP_GPIO GPIOA
31 #define BEEP_PIN Pin_15 // PA15 (Beeper)
32 #define BEEP_PERIPHERAL RCC_APB2Periph_GPIOA
34 #define MPU6000_CS_GPIO GPIOA
35 #define MPU6000_CS_PIN GPIO_Pin_4
36 #define MPU6000_SPI_INSTANCE SPI1
38 #define M25P16_CS_GPIO GPIOB
39 #define M25P16_CS_PIN GPIO_Pin_12
40 #define M25P16_SPI_INSTANCE SPI2
42 #define USE_FLASHFS
43 #define USE_FLASH_M25P16
45 #define USABLE_TIMER_CHANNEL_COUNT 12
47 //#define DEBUG_MPU_DATA_READY_INTERRUPT
48 #define USE_MPU_DATA_READY_SIGNAL
50 #define GYRO
51 #define USE_GYRO_SPI_MPU6000
53 #define GYRO_MPU6000_ALIGN CW270_DEG
55 #define ACC
56 #define USE_ACC_SPI_MPU6000
58 #define ACC_MPU6000_ALIGN CW270_DEG
60 // External I2C BARO
61 #define BARO
62 #define USE_BARO_MS5611
63 #define USE_BARO_BMP085
65 // External I2C MAG
66 #define MAG
67 #define USE_MAG_HMC5883
68 #define USE_MAG_AK8975
69 #define USE_MAG_MAG3110
71 #define INVERTER
72 #define BEEPER
73 //#define DISPLAY
74 //#define DISPLAY_ARMED_BITMAP
76 #define USE_VCP
77 #define USE_USART1
78 #define USE_USART3
79 #define USE_SOFTSERIAL1
80 #define SERIAL_PORT_COUNT 4
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 USART3_RX_PIN Pin_11
87 #define USART3_TX_PIN Pin_10
88 #define USART3_GPIO GPIOB
89 #define USART3_APB1_PERIPHERALS RCC_APB1Periph_USART3
90 #define USART3_APB2_PERIPHERALS RCC_APB2Periph_GPIOB
92 #define USE_SPI
93 #define USE_SPI_DEVICE_1
94 #define USE_SPI_DEVICE_2
96 #define USE_I2C
97 #define I2C_DEVICE (I2CDEV_2) // Flex port - SCL/PB10, SDA/PB11
99 #define USE_ADC
101 #define CURRENT_METER_ADC_GPIO GPIOB
102 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_1
103 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_9
105 #define VBAT_ADC_GPIO GPIOA
106 #define VBAT_ADC_GPIO_PIN GPIO_Pin_0
107 #define VBAT_ADC_CHANNEL ADC_Channel_0
109 #define RSSI_ADC_GPIO GPIOA
110 #define RSSI_ADC_GPIO_PIN GPIO_Pin_1
111 #define RSSI_ADC_CHANNEL ADC_Channel_1
113 #define GPS
114 #define GPS_PROTO_NMEA
115 #define GPS_PROTO_UBLOX
116 #define GPS_PROTO_I2C_NAV
117 #define GPS_PROTO_NAZA
119 #define NAV
121 //#define LED_STRIP
122 //#define LED_STRIP_TIMER TIM3
124 #define BLACKBOX
125 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
127 #define TELEMETRY
128 #define TELEMETRY_FRSKY
129 #define TELEMETRY_HOTT
130 #define TELEMETRY_SMARTPORT
131 #define TELEMETRY_LTM
133 #define SERIAL_RX
134 #define SONAR
135 #define USE_SERVOS
136 #define USE_CLI
138 #define SKIP_CLI_COMMAND_HELP
140 //#define USE_SERIAL_4WAY_BLHELI_INTERFACE
142 #define SPEKTRUM_BIND
143 // USART3, PB11 (Flexport)
144 #define BIND_PORT GPIOB
145 #define BIND_PIN Pin_11
147 //Disables uncommon predefined mixer settings like BiCopter, H6 and similar exotics
148 #define DISABLE_UNCOMMON_MIXERS
150 // DEBUG
151 //#define HIL
152 //#define USE_FAKE_MAG
153 //#define USE_FAKE_BARO
154 //#define USE_FAKE_GPS