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
44 #define BEEPER_INVERTED
45 #define BEEPER_PWM_FREQUENCY 3150
49 #define GYRO_INT_EXTI PC4
50 #define USE_MPU_DATA_READY_SIGNAL
51 #define ENSURE_MPU_DATA_READY_IS_LOW
53 #define MPU6500_CS_PIN SPI1_NSS_PIN
54 #define MPU6500_SPI_BUS BUS_SPI1
56 #define USE_IMU_MPU6500
57 #define IMU_MPU6500_ALIGN CW90_DEG
60 #define USE_I2C_DEVICE_2
65 #define MAG_I2C_BUS BUS_I2C2
66 #define USE_MAG_HMC5883
67 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
68 #define USE_MAG_QMC5883
70 #define TEMPERATURE_I2C_BUS BUS_I2C2
73 #define BARO_I2C_BUS BUS_I2C2
74 #define USE_BARO_MS5611
75 #define USE_BARO_BMP280
79 #define MAX7456_SPI_BUS BUS_SPI1
80 #define MAX7456_CS_PIN PA14
82 #if defined(YUPIF4MINI)
85 #define USE_SDCARD_SPI
86 #define SDCARD_DETECT_INVERTED
87 #define SDCARD_DETECT_PIN PD2
88 #define SDCARD_SPI_BUS BUS_SPI3
89 #define SDCARD_CS_PIN SPI3_NSS_PIN
95 #define USE_UART_INVERTER
98 #define UART1_RX_PIN PA10
99 #define UART1_TX_PIN PA9
102 #define UART3_RX_PIN PB11
103 #define UART3_TX_PIN PB10
106 #define UART4_RX_PIN PC11
107 #define UART4_TX_PIN PC10
110 #define UART6_RX_PIN PC7
111 #define UART6_TX_PIN PC6
112 #define INVERTER_PIN_UART6_RX PB15
114 #define SERIAL_PORT_COUNT 5
116 #define USE_ESCSERIAL
117 #define ESCSERIAL_TIMER_TX_HARDWARE 0
120 #define USE_SPI_DEVICE_1 // Gyro
121 #define SPI1_NSS_PIN PA4
122 #define SPI1_SCK_PIN PA5
123 #define SPI1_MISO_PIN PA6
124 #define SPI1_MOSI_PIN PA7
126 #define USE_SPI_DEVICE_3 // SD Card
127 #define SPI3_NSS_PIN PA15
128 #define SPI3_SCK_PIN PC10
129 #define SPI3_MISO_PIN PC11
130 #define SPI3_MOSI_PIN PC12
133 #define BOARD_HAS_VOLTAGE_DIVIDER
135 #define ADC_CHANNEL_1_PIN PC1
136 #define ADC_CHANNEL_2_PIN PC0
137 #define VBAT_ADC_CHANNEL ADC_CHN_1
138 #define RSSI_ADC_CHANNEL ADC_CHN_2
140 // LED Strip can run off Pin 5 (PB1) of the motor outputs
141 #define USE_LED_STRIP
142 #define WS2811_PIN PB1
145 // #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
147 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
148 #define SERIALRX_PROVIDER SERIALRX_SBUS
149 #define SERIALRX_UART SERIAL_PORT_USART6
150 #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_OSD)
152 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
154 // Number of available PWM outputs
155 #define MAX_PWM_OUTPUT_PORTS 6
157 #define TARGET_IO_PORTA 0xffff
158 #define TARGET_IO_PORTB 0xffff
159 #define TARGET_IO_PORTC 0xffff
160 #define TARGET_IO_PORTD (BIT(2))
162 #define PCA9685_I2C_BUS BUS_I2C2