2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #define TARGET_BOARD_IDENTIFIER "CJM1" // CJMCU
24 #define USE_HARDWARE_REVISION_DETECTION
25 #define USE_TARGET_CONFIG
26 #define TARGET_BUS_INIT
35 #define USE_GYRO_MPU6050
38 #define USE_ACC_MPU6050
41 //#define USE_MAG_HMC5883
43 #define BRUSHED_MOTORS
48 #define SERIAL_PORT_COUNT 2
51 #define USE_I2C_DEVICE_1
52 #define I2C_DEVICE (I2CDEV_1)
54 // #define SOFT_I2C // enable to test software i2c
55 // #define SOFT_I2C_PB1011 // If SOFT_I2C is enabled above, need to define pinout as well (I2C1 = PB67, I2C2 = PB1011)
56 // #define SOFT_I2C_PB67
63 #define USE_SPI_DEVICE_1
66 #define RX_SPI_INSTANCE SPI1
68 // Nordic Semiconductor uses 'CSN', STM uses 'NSS'
70 #define RX_NSS_PIN PA11
71 #define RX_SPI_EXTI_PIN PA8
72 // CJMCU has NSS on PA11, rather than the standard PA4
73 #define SPI1_NSS_PIN RX_NSS_PIN
75 #define SPI1_SCK_PIN PA5
76 #define SPI1_MISO_PIN PA6
77 #define SPI1_MOSI_PIN PA7
82 //#define USE_RX_INAV // Temporary disabled to make some room in flash
85 //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_SYMA_X5
86 //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_SYMA_X5C
87 //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_INAV
88 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_H8_3D
89 //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_CX10A
90 //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_V202_1M
92 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
93 //#define USE_TELEMETRY
94 //#define USE_TELEMETRY_LTM
95 //#define USE_TELEMETRY_NRF24_LTM
109 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
112 #endif //USE_RX_NRF24
114 #define BRUSHED_MOTORS
115 #define DEFAULT_FEATURES FEATURE_MOTOR_STOP
116 #undef USE_SERIAL_PASSTHROUGH
119 // Since the CJMCU PCB has holes for 4 motors in each corner we can save same flash space by disabling support for other mixers.
120 #define USE_QUAD_MIXER_ONLY
123 // Number of available PWM outputs
124 //#define MAX_PWM_OUTPUT_PORTS 4
126 // IO - assuming all IOs on 48pin package TODO
127 #define TARGET_IO_PORTA 0xffff
128 #define TARGET_IO_PORTB 0xffff
129 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
131 #define USABLE_TIMER_CHANNEL_COUNT 14
132 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4))