Added common target header file.
[betaflight.git] / src / main / target / CJMCU / target.h
blobf80c48f6ed5422937a22bfce27a69cdb1e3ba4a5
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 "CJM1" // CJMCU
21 #define USE_HARDWARE_REVISION_DETECTION
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
37 #define ACC
38 #define USE_ACC_MPU6050
40 #define GYRO
41 #define USE_GYRO_MPU6050
43 //#define MAG
44 //#define USE_MAG_HMC5883
46 #define BRUSHED_MOTORS
48 #define USE_USART1
49 #define USE_USART2
51 #define SERIAL_PORT_COUNT 2
53 #define USE_I2C
54 #define I2C_DEVICE (I2CDEV_1)
56 // #define SOFT_I2C // enable to test software i2c
57 // #define SOFT_I2C_PB1011 // If SOFT_I2C is enabled above, need to define pinout as well (I2C1 = PB67, I2C2 = PB1011)
58 // #define SOFT_I2C_PB67
60 #define SERIAL_RX
61 #define USE_SERVOS
62 #define USE_CLI
64 #define SPEKTRUM_BIND
65 // USART2, PA3
66 #define BIND_PORT GPIOA
67 #define BIND_PIN Pin_3
69 // Since the CJMCU PCB has holes for 4 motors in each corner we can save same flash space by disabling support for other mixers.
70 #define USE_QUAD_MIXER_ONLY
73 #if (FLASH_SIZE > 64)
74 #define BLACKBOX
75 #else
76 #define SKIP_TASK_STATISTICS
77 #endif
79 //#undef USE_CLI
80 //#define BLACKBOX