add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / YUPIF7 / target.h
blob6123af03ab541365eff1d900c1fea0fc26f276c0
1 /*
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/>.
18 #pragma once
19 #define TARGET_BOARD_IDENTIFIER "YPF7"
20 #define USBD_PRODUCT_STRING "YUPIF7"
22 #define LED0 PB4
24 //define camera control
25 #define CAMERA_CONTROL_PIN PB7
27 #define BEEPER PB14
28 #define BEEPER_INVERTED
29 #define BEEPER_PWM_FREQUENCY 3150
31 // Gyro interrupt
32 #define USE_EXTI
33 #define GYRO_INT_EXTI PC4
34 #define USE_MPU_DATA_READY_SIGNAL
35 #define ENSURE_MPU_DATA_READY_IS_LOW
37 // ICM 20689
38 #define USE_IMU_ICM20689
39 #define IMU_ICM20689_ALIGN CW90_DEG
40 #define ICM20689_CS_PIN SPI1_NSS_PIN
41 #define ICM20689_SPI_BUS BUS_SPI1
43 #define USE_MAG
44 #define MAG_I2C_BUS BUS_I2C1
45 #define USE_MAG_HMC5883
46 #define USE_MAG_QMC5883
47 #define TEMPERATURE_I2C_BUS BUS_I2C1
48 #define BNO055_I2C_BUS BUS_I2C1
50 #define USE_BARO
51 #define BARO_I2C_BUS BUS_I2C1
52 #define USE_BARO_MS5611
53 #define USE_BARO_BMP280
55 // Serial ports
56 #define USB_IO
57 #define USE_VCP
58 #define VBUS_SENSING_PIN PA8
59 #define VBUS_SENSING_ENABLED
61 #define USE_UART1
62 #define UART1_RX_PIN PA10
63 #define UART1_TX_PIN PA9
65 #define USE_UART3
66 #define UART3_RX_PIN PB11
67 #define UART3_TX_PIN PB10
69 #define USE_UART5
70 #define UART5_RX_PIN PD2
71 #define UART5_TX_PIN PC12
73 #define USE_UART6
74 #define UART6_RX_PIN PC7
75 #define UART6_TX_PIN PC6
77 #define USE_SOFTSERIAL1
78 #define SOFTSERIAL_1_RX_PIN PB0
79 #define SOFTSERIAL_1_TX_PIN PB1
81 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART3, USART5, USART6
83 #define USE_ESCSERIAL
84 #define ESCSERIAL_TIMER_TX_HARDWARE 0
86 #define UG2864_I2C_BUS BUS_I2C1
87 #define USE_DASHBOARD
88 #define USE_OLED_UG2864
89 #define DASHBOARD_ARMED_BITMAP
91 #define USE_PITOT
92 #define PITOT_I2C_BUS BUS_I2C1
94 //SPI ports
95 #define USE_SPI
97 #define USE_SPI_DEVICE_1
98 #define SPI1_NSS_PIN PA4
99 #define SPI1_SCK_PIN PA5
100 #define SPI1_MISO_PIN PA6
101 #define SPI1_MOSI_PIN PA7
103 #define USE_SPI_DEVICE_3
104 #define SPI3_NSS_PIN PA15
105 #define SPI3_SCK_PIN PC10
106 #define SPI3_MISO_PIN PC11
107 #define SPI3_MOSI_PIN PB5
109 // I2C Port
110 #define USE_I2C
111 #define USE_I2C_DEVICE_1
112 #define I2C1_SCL PB8
113 #define I2C1_SDA PB9
114 #define I2C_DEVICE (I2CDEV_1)
116 // OSD
117 #define USE_MAX7456
118 #define MAX7456_SPI_BUS BUS_SPI1
119 #define MAX7456_CS_PIN PA14
121 // Dataflash
122 #define M25P16_CS_PIN SPI3_NSS_PIN
123 #define M25P16_SPI_BUS BUS_SPI3
124 #define USE_FLASHFS
125 #define USE_FLASH_M25P16
126 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
128 // ADC inputs
129 #define USE_ADC
130 #define ADC_CHANNEL_1_PIN PC0
131 #define ADC_CHANNEL_2_PIN PC1
132 #define ADC_CHANNEL_3_PIN PC2
133 #define RSSI_ADC_CHANNEL ADC_CHN_1
134 #define VBAT_ADC_CHANNEL ADC_CHN_2
135 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
136 #define CURRENT_METER_SCALE 235
138 // LED Strip can run off Pin 5 (PB1) of the motor outputs
139 #define USE_LED_STRIP
140 #define WS2811_PIN PB1
142 // DSHOT
143 #define USE_DSHOT
144 #define USE_ESC_SENSOR
146 // Default configuration
147 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
148 #define SERIALRX_PROVIDER SERIALRX_SBUS
149 #define SERIALRX_UART SERIAL_PORT_USART6
150 #define TELEMETRY_UART SERIAL_PORT_USART1
151 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
153 // Target IO and timers
154 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define MAX_PWM_OUTPUT_PORTS 9
157 #define TARGET_MOTOR_COUNT 6
159 #define TARGET_IO_PORTA 0xffff
160 #define TARGET_IO_PORTB 0xffff
161 #define TARGET_IO_PORTC 0xffff
162 #define TARGET_IO_PORTD (BIT(2))