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 "YPF7"
21 #define USBD_PRODUCT_STRING "YUPIF7"
25 //define camera control
26 #define CAMERA_CONTROL_PIN PB7
30 #define BEEPER_INVERTED
31 #define BEEPER_PWM_FREQUENCY 3150
35 #define GYRO_INT_EXTI PC4
36 #define USE_MPU_DATA_READY_SIGNAL
37 #define ENSURE_MPU_DATA_READY_IS_LOW
40 #define MPU6500_CS_PIN SPI1_NSS_PIN
41 #define MPU6500_SPI_BUS BUS_SPI1
43 #define USE_IMU_MPU6500
44 #define IMU_MPU6500_ALIGN CW90_DEG
47 #define MAG_I2C_BUS BUS_I2C1
48 #define USE_MAG_HMC5883
49 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
50 #define USE_MAG_QMC5883
52 #define TEMPERATURE_I2C_BUS BUS_I2C1
55 #define BARO_I2C_BUS BUS_I2C1
56 #define USE_BARO_MS5611
57 #define USE_BARO_BMP280
61 #define VBUS_SENSING_PIN PA8
64 #define UART1_RX_PIN PA10
65 #define UART1_TX_PIN PA9
68 #define UART3_RX_PIN PB11
69 #define UART3_TX_PIN PB10
72 #define UART5_RX_PIN PD2
73 #define UART5_TX_PIN PC12
76 #define UART6_RX_PIN PC7
77 #define UART6_TX_PIN PC6
79 #define USE_SOFTSERIAL1
80 #define SOFTSERIAL_1_RX_PIN PB0
81 #define SOFTSERIAL_1_TX_PIN PB1
83 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART3, USART5, USART6
86 #define ESCSERIAL_TIMER_TX_HARDWARE 0
88 #define UG2864_I2C_BUS BUS_I2C1
90 #define USE_OLED_UG2864
91 #define DASHBOARD_ARMED_BITMAP
94 #define PITOT_I2C_BUS BUS_I2C1
99 #define USE_SPI_DEVICE_1
100 #define SPI1_NSS_PIN PA4
101 #define SPI1_SCK_PIN PA5
102 #define SPI1_MISO_PIN PA6
103 #define SPI1_MOSI_PIN PA7
105 #define USE_SPI_DEVICE_3
106 #define SPI3_NSS_PIN PA15
107 #define SPI3_SCK_PIN PC10
108 #define SPI3_MISO_PIN PC11
109 #define SPI3_MOSI_PIN PB5
113 #define USE_I2C_DEVICE_1
116 #define I2C_DEVICE (I2CDEV_1)
121 #define MAX7456_SPI_BUS BUS_SPI1
122 #define MAX7456_CS_PIN PA14
125 #define M25P16_CS_PIN SPI3_NSS_PIN
126 #define M25P16_SPI_BUS BUS_SPI3
128 #define USE_FLASH_M25P16
129 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
133 #define ADC_CHANNEL_1_PIN PC0
134 #define ADC_CHANNEL_2_PIN PC1
135 #define ADC_CHANNEL_3_PIN PC2
136 #define RSSI_ADC_CHANNEL ADC_CHN_1
137 #define VBAT_ADC_CHANNEL ADC_CHN_2
138 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
139 #define CURRENT_METER_SCALE 235
141 // LED Strip can run off Pin 5 (PB1) of the motor outputs
142 #define USE_LED_STRIP
143 #define WS2811_PIN PB1
147 #define USE_ESC_SENSOR
149 // Default configuration
150 #define SERIALRX_PROVIDER SERIALRX_SBUS
151 #define SERIALRX_UART SERIAL_PORT_USART6
152 #define TELEMETRY_UART SERIAL_PORT_USART1
153 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
155 // Target IO and timers
156 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
158 #define MAX_PWM_OUTPUT_PORTS 9
159 #define TARGET_MOTOR_COUNT 6
161 #define TARGET_IO_PORTA 0xffff
162 #define TARGET_IO_PORTB 0xffff
163 #define TARGET_IO_PORTC 0xffff
164 #define TARGET_IO_PORTD (BIT(2))