Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / KISSFC / target.h
blob0a22d59e8efb46704c0634e3e96a9d246f848304
1 /*
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)
8 * any later version.
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/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "KISS"
26 #define SBUS_PORT_OPTIONS (SERIAL_STOPBITS_2 | SERIAL_PARITY_EVEN | SERIAL_INVERTED | SERIAL_BIDIR)
28 #define USE_ESCSERIAL
29 #define ESCSERIAL_TIMER_TX_PIN PA13 // (Hardware=6, common to KISSFC & KISSCC)
30 #define REMAP_TIM17_DMA
32 #define LED0_PIN PB1
34 #define USE_BEEPER
35 #define BEEPER_PIN PB13
36 #define BEEPER_INVERTED
38 #define USE_EXTI
39 #define USE_GYRO_EXTI
40 #define GYRO_1_EXTI_PIN PB2
41 #define USE_MPU_DATA_READY_SIGNAL
42 #define ENSURE_MPU_DATA_READY_IS_LOW
44 #ifdef KISSCC
45 #define USE_TARGET_CONFIG
47 #define USE_GYRO
48 #define USE_GYRO_MPU6050
49 #define GYRO_1_ALIGN CW90_DEG
51 #define USE_ACC
52 #define USE_ACC_MPU6050
54 #define DEFAULT_MIXER MIXER_QUADX_1234
56 #undef USE_LED_STRIP
57 #else
58 #define USE_GYRO
59 #define USE_GYRO_MPU6050
60 #define GYRO_1_ALIGN CW180_DEG
62 #define USE_ACC
63 #define USE_ACC_MPU6050
64 #endif
66 #define USE_VCP
67 #define USE_UART1
68 #define USE_UART2
69 #define USE_UART3
70 #define USE_SOFTSERIAL1
71 #define USE_SOFTSERIAL2
73 #define SERIAL_PORT_COUNT 6
75 #define UART1_TX_PIN PA9
76 #define UART1_RX_PIN PA10
78 #define UART2_TX_PIN PB3
79 #define UART2_RX_PIN PB4
81 #define UART3_TX_PIN PB10 // PB10 (AF7)
82 #define UART3_RX_PIN PB11 // PB11 (AF7)
84 #define SOFTSERIAL1_TX_PIN PA13 // KISSFC: AUX1, KISSCC: TLM
85 #if !defined(KISSCC)
86 #define SOFTSERIAL2_TX_PIN PA15 // ROLL
87 #endif
89 #define USE_I2C
90 #define USE_I2C_DEVICE_1
91 #define I2C_DEVICE (I2CDEV_1)
93 #define USE_ADC
94 #define VBAT_SCALE_DEFAULT 160
95 #define ADC_INSTANCE ADC1
96 #define VBAT_ADC_PIN PA0
97 #define CURRENT_METER_ADC_PIN PA2
98 //#define RSSI_ADC_PIN PB2
100 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
101 #define SERIALRX_PROVIDER SERIALRX_SBUS
102 #define SERIALRX_UART SERIAL_PORT_USART2
104 #define AVOID_UART2_FOR_PWM_PPM
106 #define TARGET_IO_PORTA 0xffff
107 #define TARGET_IO_PORTB 0xffff
108 #define TARGET_IO_PORTC 0xffff
109 #define TARGET_IO_PORTD 0xffff
110 #define TARGET_IO_PORTF (BIT(4))
112 #define USABLE_TIMER_CHANNEL_COUNT 11
113 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) | TIM_N(17))