Fix WS2812 led definition
[inav.git] / src / main / target / DALRCF722DUAL / target.h
blobb7d2b4a0d1ae1b85c5899fc6ee60db95084555d0
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
20 #define TARGET_BOARD_IDENTIFIER "DLF7"
21 #define USBD_PRODUCT_STRING "DALRCF722DUAL"
23 #define USE_HARDWARE_PREBOOT_SETUP
25 #define LED0 PC14
26 #define BEEPER PC13
27 #define BEEPER_INVERTED
29 // MPU6000
30 #define USE_IMU_MPU6000
31 #define IMU_MPU6000_ALIGN CW180_DEG
32 #define MPU6000_CS_PIN PB0
33 #define MPU6000_SPI_BUS BUS_SPI1
35 #define USE_VCP
37 #define USE_UART1
38 #define UART1_TX_PIN PB6
39 #define UART1_RX_PIN PB7
41 #define USE_UART2
42 #define UART2_TX_PIN PA2
43 #define UART2_RX_PIN PA3
45 #define USE_UART3
46 #define UART3_TX_PIN PC10
47 #define UART3_RX_PIN PC11
49 #define USE_UART4
50 #define UART4_TX_PIN PA0
51 #define UART4_RX_PIN PA1
53 #define USE_UART5
54 #define UART5_TX_PIN PC12
55 #define UART5_RX_PIN PD2
56 #define SERIAL_PORT_COUNT 6
58 #define USE_I2C
59 #define USE_I2C_DEVICE_1
60 #define I2C1_SCL PB8
61 #define I2C1_SDA PB9
64 #define USE_BARO
65 #define BARO_I2C_BUS BUS_I2C1
66 #define USE_BARO_BMP280
67 #define USE_BARO_MS5611
68 #define USE_BARO_BMP085
71 #define USE_MAG
72 #define MAG_I2C_BUS BUS_I2C1
73 #define USE_MAG_HMC5883
74 #define USE_MAG_QMC5883
75 #define USE_MAG_IST8310
76 #define USE_MAG_IST8308
77 #define USE_MAG_MAG3110
78 #define USE_MAG_LIS3MDL
80 #define TEMPERATURE_I2C_BUS BUS_I2C1
81 #define PITOT_I2C_BUS BUS_I2C1
83 #define USE_SPI
84 #define USE_SPI_DEVICE_1
85 #define SPI1_SCK_PIN PA5
86 #define SPI1_MISO_PIN PA6
87 #define SPI1_MOSI_PIN PA7
89 #define USE_SPI_DEVICE_2
90 #define SPI2_NSS_PIN PB12
91 #define SPI2_SCK_PIN PB13
92 #define SPI2_MISO_PIN PB14
93 #define SPI2_MOSI_PIN PB15
95 #define USE_SPI_DEVICE_3
96 #define SPI3_NSS_PIN NONE
97 #define SPI3_SCK_PIN PB3
98 #define SPI3_MISO_PIN PB4
99 #define SPI3_MOSI_PIN PB5
101 #define USE_MAX7456
102 #define MAX7456_SPI_BUS BUS_SPI2
103 #define MAX7456_CS_PIN SPI2_NSS_PIN
105 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
106 #define M25P16_CS_PIN PB2
107 #define M25P16_SPI_BUS BUS_SPI3
108 #define USE_FLASHFS
109 #define USE_FLASH_M25P16
111 #define USE_ADC
112 #define ADC_CHANNEL_1_PIN PC0
113 #define ADC_CHANNEL_2_PIN PC1
114 #define ADC_CHANNEL_3_PIN PA0
116 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
117 #define VBAT_ADC_CHANNEL ADC_CHN_2
118 #define RSSI_ADC_CHANNEL ADC_CHN_3
119 #define VBAT_SCALE_DEFAULT 1600
121 #define USE_LED_STRIP
122 #define WS2811_PIN PA15
123 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_ST5_HANDLER
124 #define WS2811_DMA_STREAM DMA1_Stream5
125 #define WS2811_DMA_CHANNEL DMA_CHANNEL_3
127 #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_OSD )
128 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
129 #define SERIALRX_PROVIDER SERIALRX_SBUS
130 #define SERIALRX_UART SERIAL_PORT_USART1
132 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
134 #define MAX_PWM_OUTPUT_PORTS 6
135 #define USE_DSHOT
136 #define USE_ESC_SENSOR
138 #define TARGET_IO_PORTA 0xffff
139 #define TARGET_IO_PORTB 0xffff
140 #define TARGET_IO_PORTC 0xffff
141 #define TARGET_IO_PORTD (BIT(2))