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 #if defined (YUPIF4R2)
21 #define TARGET_BOARD_IDENTIFIER "YPF4R2"
22 #define USBD_PRODUCT_STRING "YUPIF4R2"
24 #define TARGET_BOARD_IDENTIFIER "YPF4M"
25 #define USBD_PRODUCT_STRING "YUPIF4MINI"
27 #define TARGET_BOARD_IDENTIFIER "YPF4"
28 #define USBD_PRODUCT_STRING "YUPIF4"
40 #if defined(YUPIF4MINI)
41 // #define BEEPER_INVERTED
43 #define BEEPER_INVERTED
44 #define BEEPER_PWM_FREQUENCY 3150
47 #define MPU6500_CS_PIN SPI1_NSS_PIN
48 #define MPU6500_SPI_BUS BUS_SPI1
50 #define USE_IMU_MPU6500
51 #define IMU_MPU6500_ALIGN CW90_DEG
54 #define USE_I2C_DEVICE_2
59 #define MAG_I2C_BUS BUS_I2C2
62 #define TEMPERATURE_I2C_BUS BUS_I2C2
65 #define BARO_I2C_BUS BUS_I2C2
66 #define USE_BARO_MS5611
67 #define USE_BARO_BMP280
70 #define MAX7456_SPI_BUS BUS_SPI1
71 #define MAX7456_CS_PIN PA14
73 #if defined(YUPIF4MINI)
76 #define USE_SDCARD_SPI
77 #define SDCARD_DETECT_INVERTED
78 #define SDCARD_DETECT_PIN PD2
79 #define SDCARD_SPI_BUS BUS_SPI3
80 #define SDCARD_CS_PIN SPI3_NSS_PIN
86 #define USE_UART_INVERTER
89 #define UART1_RX_PIN PA10
90 #define UART1_TX_PIN PA9
93 #define UART3_RX_PIN PB11
94 #define UART3_TX_PIN PB10
97 #define UART4_RX_PIN PC11
98 #define UART4_TX_PIN PC10
101 #define UART6_RX_PIN PC7
102 #define UART6_TX_PIN PC6
103 #define INVERTER_PIN_UART6_RX PB15
105 #define SERIAL_PORT_COUNT 5
107 #define USE_ESCSERIAL
108 #define ESCSERIAL_TIMER_TX_HARDWARE 0
111 #define USE_SPI_DEVICE_1 // Gyro
112 #define SPI1_NSS_PIN PA4
113 #define SPI1_SCK_PIN PA5
114 #define SPI1_MISO_PIN PA6
115 #define SPI1_MOSI_PIN PA7
117 #define USE_SPI_DEVICE_3 // SD Card
118 #define SPI3_NSS_PIN PA15
119 #define SPI3_SCK_PIN PC10
120 #define SPI3_MISO_PIN PC11
121 #define SPI3_MOSI_PIN PC12
124 #define BOARD_HAS_VOLTAGE_DIVIDER
126 #define ADC_CHANNEL_1_PIN PC1
127 #define ADC_CHANNEL_2_PIN PC0
128 #define VBAT_ADC_CHANNEL ADC_CHN_1
129 #define RSSI_ADC_CHANNEL ADC_CHN_2
131 // LED Strip can run off Pin 5 (PB1) of the motor outputs
132 #define USE_LED_STRIP
133 #define WS2811_PIN PB1
136 // #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
138 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
139 #define SERIALRX_PROVIDER SERIALRX_SBUS
140 #define SERIALRX_UART SERIAL_PORT_USART6
141 #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_OSD)
143 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
145 // Number of available PWM outputs
146 #define MAX_PWM_OUTPUT_PORTS 6
148 #define TARGET_IO_PORTA 0xffff
149 #define TARGET_IO_PORTB 0xffff
150 #define TARGET_IO_PORTC 0xffff
151 #define TARGET_IO_PORTD (BIT(2))