NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
target.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Ninjaflight 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.
8  *
9  * Ninjaflight 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.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #define TARGET_BOARD_IDENTIFIER "CC3D" // CopterControl 3D
19 
20 #define USE_QUAD_MIXER_ONLY 0
21 #define USE_TILT 0
22 #define LED0_GPIO GPIOB
23 #define LED0_PIN Pin_3 // PB3 (LED)
24 #define LED0_PERIPHERAL RCC_APB2Periph_GPIOB
25 #define LED0
26 
27 #define INVERTER_PIN Pin_2 // PB2 (BOOT1) used as inverter select GPIO
28 #define INVERTER_GPIO GPIOB
29 #define INVERTER_PERIPHERAL RCC_APB2Periph_GPIOB
30 #define INVERTER_USART USART1
31 
32 #define BEEP_GPIO GPIOA
33 #define BEEP_PIN Pin_15 // PA15 (Beeper)
34 #define BEEP_PERIPHERAL RCC_APB2Periph_GPIOA
35 
36 #define MPU6000_CS_GPIO GPIOA
37 #define MPU6000_CS_PIN GPIO_Pin_4
38 #define MPU6000_SPI_INSTANCE SPI1
39 
40 #define M25P16_CS_GPIO GPIOB
41 #define M25P16_CS_PIN GPIO_Pin_12
42 #define M25P16_SPI_INSTANCE SPI2
43 
44 #define USE_FLASHFS
45 #define USE_FLASH_M25P16
46 
47 #define USABLE_TIMER_CHANNEL_COUNT 12
48 
49 //#define DEBUG_MPU_DATA_READY_INTERRUPT
50 #define USE_MPU_DATA_READY_SIGNAL
51 
52 #define GYRO
53 #define USE_GYRO_SPI_MPU6000
54 
55 #define GYRO_MPU6000_ALIGN CW270_DEG
56 
57 #define ACC
58 #define USE_ACC_SPI_MPU6000
59 
60 #define ACC_MPU6000_ALIGN CW270_DEG
61 
62 // External I2C BARO
63 #define BARO
64 #define USE_BARO_MS5611
65 #define USE_BARO_BMP085
66 
67 // External I2C MAG
68 #define USE_MAG 1
69 #define USE_MAG_HMC5883
70 
71 #define INVERTER
72 #define USE_BEEPER 1
73 #define DISPLAY
74 
75 #define USB_IO
76 
77 #define USE_VCP
78 #define USE_UART1
79 #define USE_UART3
80 #define USE_SOFTSERIAL1
81 #define SERIAL_PORT_COUNT 4
82 
83 #define SOFTSERIAL_1_TIMER TIM3
84 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 1 // PWM 2
85 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 2 // PWM 3
86 
87 #define USE_SPI
88 #define USE_SPI_DEVICE_1
89 #define USE_SPI_DEVICE_2
90 
91 #define USE_I2C
92 #define I2C_DEVICE (I2CDEV_2) // Flex port - SCL/PB10, SDA/PB11
93 
94 #define USE_ADC
95 
96 #define CURRENT_METER_ADC_GPIO GPIOB
97 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_1
98 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_9
99 
100 #define VBAT_ADC_GPIO GPIOA
101 #define VBAT_ADC_GPIO_PIN GPIO_Pin_0
102 #define VBAT_ADC_CHANNEL ADC_Channel_0
103 
104 #define RSSI_ADC_GPIO GPIOB
105 #define RSSI_ADC_GPIO_PIN GPIO_Pin_0
106 #define RSSI_ADC_CHANNEL ADC_Channel_8
107 
108 #define LED_STRIP
109 #define LED_STRIP_TIMER TIM3
110 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC6
111 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH6_HANDLER
112 
113 #define SPEKTRUM_BIND
114 // UART3, PB11 (Flexport)
115 #define BIND_PORT GPIOB
116 #define BIND_PIN Pin_11
117 
118 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
119 
120 #define SONAR
121 #define SONAR_TRIGGER_PIN Pin_5 // (PB5)
122 #define SONAR_TRIGGER_GPIO GPIOB
123 #define SONAR_ECHO_PIN Pin_0 // (PB0) - only 3.3v ( add a 1K Ohms resistor )
124 #define SONAR_ECHO_GPIO GPIOB
125 #define SONAR_EXTI_LINE EXTI_Line0
126 #define SONAR_EXTI_PIN_SOURCE GPIO_PinSource0
127 #define SONAR_EXTI_IRQN EXTI0_IRQn
128 
129 #define GPS
130 #define BLACKBOX
131 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
132 
133 #define TELEMETRY
134 #define SERIAL_RX
135 #define USE_SERVOS
136 #define USE_CLI
137 #define TARGET_MOTOR_COUNT 6
138 
139 
140