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 #pragma once
19 
20 #define TARGET_BOARD_IDENTIFIER "CJM1" // CJMCU
21 #define USE_HARDWARE_REVISION_DETECTION
22 
23 #define LED0_GPIO GPIOC
24 #define LED0_PIN Pin_14 // PC14 (LED)
25 #define LED0
26 #define LED0_PERIPHERAL RCC_APB2Periph_GPIOC
27 #define LED1_GPIO GPIOC
28 #define LED1_PIN Pin_13 // PC13 (LED)
29 #define LED1
30 #define LED1_PERIPHERAL RCC_APB2Periph_GPIOC
31 #define LED2_GPIO GPIOC
32 #define LED2_PIN Pin_15 // PC15 (LED)
33 #define LED2
34 #define LED2_PERIPHERAL RCC_APB2Periph_GPIOC
35 
36 #define USE_TILT 0
37 
38 #define ACC
39 #define USE_ACC_MPU6050
40 
41 #define GYRO
42 #define USE_GYRO_MPU6050
43 
44 #define USE_BEEPER 0
45 #define USE_MAG 1
46 #define USE_MAG_HMC5883
47 
48 #define BRUSHED_MOTORS
49 
50 #define USE_UART1
51 #define USE_UART2
52 
53 #define SERIAL_PORT_COUNT 2
54 
55 #define USE_I2C
56 #define I2C_DEVICE (I2CDEV_1)
57 
58 // #define SOFT_I2C // enable to test software i2c
59 // #define SOFT_I2C_PB1011 // If SOFT_I2C is enabled above, need to define pinout as well (I2C1 = PB67, I2C2 = PB1011)
60 // #define SOFT_I2C_PB67
61 
62 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
63 
64 #define SERIAL_RX
65 //#define USE_SERVOS
66 #define USE_CLI
67 
68 #define SPEKTRUM_BIND
69 // UART2, PA3
70 #define BIND_PORT GPIOA
71 #define BIND_PIN Pin_3
72 
73 // Since the CJMCU PCB has holes for 4 motors in each corner we can save same flash space by disabling support for other mixers.
74 
75 #define USE_QUAD_MIXER_ONLY 1
76 
77 
78 #if (FLASH_SIZE > 64)
79 #define BLACKBOX
80 #else
81 #define SKIP_TASK_STATISTICS
82 #define SKIP_CLI_COMMAND_HELP
83 #endif
84 
85 //#undef USE_CLI
86 //#define GTUNE
87 //#define BLACKBOX