[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / target / DALRCF405 / target.h
blobb478f8e2382c4d4fb9e91cef22d5dfd7c23df91e
1 /*
2 * This is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This software is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this software. If not, see <http://www.gnu.org/licenses/>.
17 #pragma once
19 #define TARGET_BOARD_IDENTIFIER "DLF4"
20 #define USBD_PRODUCT_STRING "DALRCF405"
22 #define LED0 PC14
24 #define BEEPER PC13
25 #define BEEPER_INVERTED
27 // *************** Gyro & ACC **********************
28 #define USE_SPI
29 #define USE_SPI_DEVICE_1
31 #define SPI1_SCK_PIN PB3
32 #define SPI1_MISO_PIN PA6
33 #define SPI1_MOSI_PIN PA7
35 #define USE_EXTI
36 #define GYRO_INT_EXTI PC4
37 #define USE_MPU_DATA_READY_SIGNAL
39 #define MPU6500_CS_PIN PA4
40 #define MPU6500_SPI_BUS BUS_SPI1
41 #define USE_IMU_MPU6500
42 #define IMU_MPU6500_ALIGN CW90_DEG
44 #define MPU6000_CS_PIN PA4
45 #define MPU6000_SPI_BUS BUS_SPI1
46 #define USE_IMU_MPU6000
47 #define IMU_MPU6000_ALIGN CW90_DEG
50 //FLASH
51 #define USE_SPI_DEVICE_2
52 #define SPI2_SCK_PIN PB13
53 #define SPI2_MISO_PIN PB14
54 #define SPI2_MOSI_PIN PC3
56 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
57 #define USE_FLASHFS
58 #define USE_FLASH_M25P16
59 #define M25P16_CS_PIN PB12
60 #define M25P16_SPI_BUS BUS_SPI2
62 //OSD
64 #define USE_SPI_DEVICE_3
65 #define SPI3_SCK_PIN PC10
66 #define SPI3_MISO_PIN PC11
67 #define SPI3_MOSI_PIN PB5
69 #define USE_OSD
70 #define USE_MAX7456
71 #define MAX7456_SPI_BUS BUS_SPI3
72 #define MAX7456_CS_PIN PA15
74 //I2C
76 #define USE_I2C
77 #define USE_I2C_DEVICE_1
78 #define I2C1_SCL PB8
79 #define I2C1_SDA PB9
80 #define DEFAULT_I2C_BUS BUS_I2C1
82 #define USE_BARO
83 #define BARO_I2C_BUS DEFAULT_I2C_BUS
84 #define USE_BARO_BMP280
85 #define USE_BARO_MS5611
86 #define USE_BARO_BMP085
88 #define USE_MAG
89 #define MAG_I2C_BUS DEFAULT_I2C_BUS
90 #define USE_MAG_AK8963
91 #define USE_MAG_AK8975
92 #define USE_MAG_HMC5883
93 #define USE_MAG_QMC5883
94 #define USE_MAG_IST8310
95 #define USE_MAG_MAG3110
96 #define USE_MAG_LIS3MDL
98 #define TEMPERATURE_I2C_BUS BUS_I2C1
100 #define USE_RANGEFINDER
101 #define USE_RANGEFINDER_HCSR04_I2C
102 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
104 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
106 //USART
107 #define USE_VCP
109 #define USE_UART1
110 #define UART1_RX_PIN PB7
111 #define UART1_TX_PIN PA9
113 #define USE_UART2
114 #define UART2_RX_PIN PA3
115 #define UART2_TX_PIN PA2
117 #define USE_UART3
118 #define UART3_RX_PIN PB11
119 #define UART3_TX_PIN PB10
121 #define USE_UART5
122 #define UART5_RX_PIN PD2
123 #define UART5_TX_PIN PC12
125 #define SERIAL_PORT_COUNT 5
127 //LED_STRIP
128 #define USE_LED_STRIP
129 #define WS2811_PIN PB6
131 //ADC
132 #define USE_ADC
133 #define ADC_INSTANCE ADC1
134 #define ADC1_DMA_STREAM DMA2_Stream0
135 #define ADC_CHANNEL_1_PIN PC2
136 #define ADC_CHANNEL_2_PIN PC1
137 #define ADC_CHANNEL_3_PIN PA0
138 #define VBAT_ADC_CHANNEL ADC_CHN_1
139 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
140 #define RSSI_ADC_CHANNEL ADC_CHN_3
142 #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_OSD)
144 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
146 #define TARGET_IO_PORTA 0xffff
147 #define TARGET_IO_PORTB 0xffff
148 #define TARGET_IO_PORTC 0xffff
149 #define TARGET_IO_PORTD 0xffff
151 //TIMER
152 #define MAX_PWM_OUTPUT_PORTS 10