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/>.
24 #define TARGET_BOARD_IDENTIFIER "PLUM"
25 #define USBD_PRODUCT_STRING "PLUMF4"
27 #elif defined(KIWIF4V2)
28 #define TARGET_BOARD_IDENTIFIER "KIW2"
29 #define USBD_PRODUCT_STRING "KIWIF4V2"
32 #define TARGET_BOARD_IDENTIFIER "KIWI"
33 #define USBD_PRODUCT_STRING "KIWIF4"
37 #if defined(PLUMF4) || defined(KIWIF4V2)
46 #define BEEPER_PIN PA8
48 #define INVERTER_PIN_UART1 PC0 // PC0 used as inverter select GPIO
53 #define GYRO_1_EXTI_PIN PC4
54 #define USE_MPU_DATA_READY_SIGNAL
56 #define GYRO_1_CS_PIN PA4
57 #define GYRO_1_SPI_INSTANCE SPI1
62 #define USE_GYRO_SPI_MPU6000
63 #define GYRO_1_ALIGN CW180_DEG
64 #define USE_ACC_SPI_MPU6000
66 #if defined(KIWIF4) || defined(KIWIF4V2)
71 #define MAX7456_SPI_INSTANCE SPI3
72 #define MAX7456_SPI_CS_PIN PA15
75 #define MAX7456_SPI_INSTANCE SPI2
76 #define MAX7456_SPI_CS_PIN PB12
77 //#define MAX7456_DMA_CHANNEL_TX DMA1_Stream5 // Can't convert to dmaopt
78 //#define MAX7456_DMA_CHANNEL_RX DMA1_Stream0 // Can't convert to dmaopt
83 #define USE_SDCARD_SPI
84 //#define SDCARD_DETECT_PIN PB9
85 #define SDCARD_SPI_INSTANCE SPI2
86 #define SDCARD_SPI_CS_PIN PB12
87 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
88 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
92 #define USE_FLASH_M25P16
93 #define FLASH_CS_PIN SPI3_NSS_PIN
94 #define FLASH_SPI_INSTANCE SPI3
98 #define USB_DETECT_PIN PC5
99 #define USE_USB_DETECT
102 #define UART1_RX_PIN PA10
103 #define UART1_TX_PIN PA9
106 #define UART3_RX_PIN PB11
107 #define UART3_TX_PIN PB10
110 #define UART6_RX_PIN PC7
111 #define UART6_TX_PIN PC6
113 #define USE_SOFTSERIAL1
114 #define USE_SOFTSERIAL2
116 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART3, USART6, SOFTSERIAL x 2
118 #define USE_ESCSERIAL
119 #define ESCSERIAL_TIMER_TX_PIN PA3 // (HARDARE=0)
123 #define USE_SPI_DEVICE_1
126 #define USE_SPI_DEVICE_2
127 #define SPI2_NSS_PIN PB12
128 #define SPI2_SCK_PIN PB13
129 #define SPI2_MISO_PIN PB14
130 #define SPI2_MOSI_PIN PB15
133 #define USE_SPI_DEVICE_3
134 #define SPI3_NSS_PIN PA15
135 #define SPI3_SCK_PIN PC10
136 #define SPI3_MISO_PIN PC11
137 #define SPI3_MOSI_PIN PC12
141 #define USE_I2C_DEVICE_1
142 #define I2C_DEVICE (I2CDEV_1)
143 #define USE_I2C_PULLUP
149 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
150 #define VBAT_ADC_PIN PC1
151 #define RSSI_ADC_PIN PC2
152 #define CURRENT_METER_ADC_PIN PC3
154 #define CURRENT_METER_SCALE_DEFAULT 444
155 #define VBAT_SCALE_DEFAULT 57
157 #define DEFAULT_FEATURES (FEATURE_OSD)
159 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
160 #define SERIALRX_PROVIDER SERIALRX_SBUS
161 #define SERIALRX_UART SERIAL_PORT_USART1
163 #define TARGET_IO_PORTA 0xffff
164 #define TARGET_IO_PORTB 0xffff
165 #define TARGET_IO_PORTC 0xffff
166 #define TARGET_IO_PORTD (BIT(2))
168 #define USABLE_TIMER_CHANNEL_COUNT 5
170 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) )