Merge pull request #10592 from iNavFlight/MrD_Update-parameter-description
[inav.git] / src / main / target / YUPIF7 / target.h
blobbec103585831fd4e7e8f233a7ea5c4dbd77f6f8e
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 // ICM 20689
32 #define USE_IMU_ICM20689
33 #define IMU_ICM20689_ALIGN CW90_DEG
34 #define ICM20689_CS_PIN SPI1_NSS_PIN
35 #define ICM20689_SPI_BUS BUS_SPI1
37 #define USE_MAG
38 #define MAG_I2C_BUS BUS_I2C1
39 #define USE_MAG_ALL
40 #define TEMPERATURE_I2C_BUS BUS_I2C1
42 #define USE_BARO
43 #define BARO_I2C_BUS BUS_I2C1
44 #define USE_BARO_MS5611
45 #define USE_BARO_BMP280
47 // Serial ports
48 #define USB_IO
49 #define USE_VCP
50 #define VBUS_SENSING_PIN PA8
51 #define VBUS_SENSING_ENABLED
53 #define USE_UART1
54 #define UART1_RX_PIN PA10
55 #define UART1_TX_PIN PA9
57 #define USE_UART3
58 #define UART3_RX_PIN PB11
59 #define UART3_TX_PIN PB10
61 #define USE_UART5
62 #define UART5_RX_PIN PD2
63 #define UART5_TX_PIN PC12
65 #define USE_UART6
66 #define UART6_RX_PIN PC7
67 #define UART6_TX_PIN PC6
69 #define USE_SOFTSERIAL1
70 #define SOFTSERIAL_1_RX_PIN PB0
71 #define SOFTSERIAL_1_TX_PIN PB1
73 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART3, USART5, USART6
75 #define USE_ESCSERIAL
76 #define ESCSERIAL_TIMER_TX_HARDWARE 0
78 #define UG2864_I2C_BUS BUS_I2C1
79 #define USE_DASHBOARD
80 #define USE_OLED_UG2864
81 #define DASHBOARD_ARMED_BITMAP
83 #define USE_PITOT
84 #define PITOT_I2C_BUS BUS_I2C1
86 //SPI ports
87 #define USE_SPI
89 #define USE_SPI_DEVICE_1
90 #define SPI1_NSS_PIN PA4
91 #define SPI1_SCK_PIN PA5
92 #define SPI1_MISO_PIN PA6
93 #define SPI1_MOSI_PIN PA7
95 #define USE_SPI_DEVICE_3
96 #define SPI3_NSS_PIN PA15
97 #define SPI3_SCK_PIN PC10
98 #define SPI3_MISO_PIN PC11
99 #define SPI3_MOSI_PIN PB5
101 // I2C Port
102 #define USE_I2C
103 #define USE_I2C_DEVICE_1
104 #define I2C1_SCL PB8
105 #define I2C1_SDA PB9
106 #define I2C_DEVICE (I2CDEV_1)
108 // OSD
109 #define USE_MAX7456
110 #define MAX7456_SPI_BUS BUS_SPI1
111 #define MAX7456_CS_PIN PA14
113 // Dataflash
114 #define M25P16_CS_PIN SPI3_NSS_PIN
115 #define M25P16_SPI_BUS BUS_SPI3
116 #define USE_FLASHFS
117 #define USE_FLASH_M25P16
118 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
120 // ADC inputs
121 #define USE_ADC
122 #define ADC_CHANNEL_1_PIN PC0
123 #define ADC_CHANNEL_2_PIN PC1
124 #define ADC_CHANNEL_3_PIN PC2
125 #define RSSI_ADC_CHANNEL ADC_CHN_1
126 #define VBAT_ADC_CHANNEL ADC_CHN_2
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
128 #define CURRENT_METER_SCALE 235
130 // LED Strip can run off Pin 5 (PB1) of the motor outputs
131 #define USE_LED_STRIP
132 #define WS2811_PIN PB1
134 // DSHOT
135 #define USE_DSHOT
136 #define USE_ESC_SENSOR
138 // Default configuration
139 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
140 #define SERIALRX_PROVIDER SERIALRX_SBUS
141 #define SERIALRX_UART SERIAL_PORT_USART6
142 #define TELEMETRY_UART SERIAL_PORT_USART1
143 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
145 // Target IO and timers
146 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
148 #define MAX_PWM_OUTPUT_PORTS 9
149 #define TARGET_MOTOR_COUNT 6
151 #define TARGET_IO_PORTA 0xffff
152 #define TARGET_IO_PORTB 0xffff
153 #define TARGET_IO_PORTC 0xffff
154 #define TARGET_IO_PORTD (BIT(2))