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/>.
20 #define TARGET_BOARD_IDENTIFIER "KFCi"
21 #define USE_HARDWARE_PREBOOT_SETUP
30 #define BEEPER_INVERTED
33 #define MPU_INT_EXTI PC5
34 #define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU INT
35 #define USE_MPU_DATA_READY_SIGNAL
36 #define ENSURE_MPU_DATA_READY_IS_LOW
38 #define MPU6000_CS_PIN PB5
39 #define MPU6000_SPI_INSTANCE SPI2
42 #define USE_GYRO_SPI_MPU6000
43 #define GYRO_MPU6000_ALIGN CW90_DEG
46 #define USE_ACC_SPI_MPU6000
47 #define ACC_MPU6000_ALIGN CW90_DEG
50 #define USE_MAG_HMC5883
53 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
55 #define SPI2_NSS_PIN PB12
56 #define SPI2_SCK_PIN PB13
57 #define SPI2_MISO_PIN PB14
58 #define SPI2_MOSI_PIN PB15
62 #define USE_FLASH_M25P16
63 #define M25P16_CS_PIN PB12
64 #define M25P16_SPI_INSTANCE SPI2
65 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
68 #define USE_BARO_MS5611
69 #define USE_BARO_SPI_MS5611
70 #define MS56XX_SPI_INSTANCE SPI2
71 #define MS56XX_CS_PIN PB2
75 #define MAX7456_SPI_INSTANCE SPI2
76 #define MAX7456_SPI_CS_PIN PA7
77 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD*2)
78 #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
80 //#define RFM_SPI SPI2
81 //#define RFM_SPI_CS_PIN PC15
82 //#define RFM_IRQ_PIN PB3
83 //#define RFM_SPI_CLK (SPI_CLOCK_STANDARD*2)
84 //#define RFM_RESTORE_CLK (SPI_CLOCK_FAST)
88 #define RX_NSS_PIN PC15
89 #define RX_NSS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOC
90 #define RX_SCK_PIN PB13
91 #define RX_MOSI_PIN PB15
92 #define RX_MISO_PIN PB14
93 #define RX_SPI_INSTANCE SPI2
94 #define RX_IRQ_PIN PB3
100 #define SERIAL_PORT_COUNT 3
102 #define UART1_TX_PIN PA9
103 #define UART1_RX_PIN PA10
105 #define UART2_TX_PIN PA2
106 #define UART2_RX_PIN PA3
109 #define I2C_DEVICE (I2CDEV_1)
111 #define I2C1_SCL PA15
112 #define I2C1_SDA PA14
115 #define USE_PITOT_ADC
116 #define USE_PITOT_MS4525
117 #define PITOT_I2C_INSTANCE I2C_DEVICE
119 #define BOARD_HAS_VOLTAGE_DIVIDER
121 #define ADC_INSTANCE ADC2
122 #define ADC_CHANNEL_1_PIN PA4
123 #define ADC_CHANNEL_2_PIN PA6
124 #define ADC_CHANNEL_3_PIN PA5
125 #define VBAT_ADC_CHANNEL ADC_CHN_1
126 #define RSSI_ADC_CHANNEL ADC_CHN_2
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
130 #define WS2811_PIN PA8
131 #define WS2811_DMA_STREAM DMA1_Channel2
132 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
134 #define DEFAULT_FEATURES (FEATURE_BLACKBOX | FEATURE_OSD | FEATURE_VBAT)
135 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
137 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
139 // Number of available PWM outputs
140 #define MAX_PWM_OUTPUT_PORTS 10
141 #define TARGET_MOTOR_COUNT 10
144 // IO - stm32f303cc in 48pin package
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD 0xffff
149 #define TARGET_IO_PORTF (BIT(4))
151 #define USABLE_TIMER_CHANNEL_COUNT 11
152 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4))