[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / target / REVO / target.h
blobbe2c511c1978b2b82444322871817b30acbaacd4
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 "REVO"
22 #define USBD_PRODUCT_STRING "Revolution"
24 // Use target-specific MAG hardware descriptors (don't use common_hardware.h)
25 #define USE_TARGET_MAG_HARDWARE_DESCRIPTORS
27 #define LED0 PB5
28 #define LED1 PB4
30 #define BEEPER PB4
32 #define USE_DSHOT
33 #define USE_ESC_SENSOR
34 #define USE_SERIALSHOT
36 // MPU6000 interrupts
37 #define USE_EXTI
38 #define GYRO_INT_EXTI PC4
39 #define USE_MPU_DATA_READY_SIGNAL
41 #define USE_IMU_MPU6000
42 #define IMU_MPU6000_ALIGN CW270_DEG
43 #define MPU6000_CS_PIN PA4
44 #define MPU6000_SPI_BUS BUS_SPI1
46 #define USE_MAG
47 #define USE_DUAL_MAG
48 #define MAG_I2C_BUS_EXT BUS_I2C2
49 #define MAG_I2C_BUS_INT BUS_I2C1
50 #define MAG_HMC5883_ALIGN CW90_DEG
51 #define USE_MAG_HMC5883
52 #define USE_MAG_QMC5883
53 #define USE_MAG_IST8310
54 #define USE_MAG_IST8308
55 #define USE_MAG_MAG3110
56 #define USE_MAG_LIS3MDL
58 #define TEMPERATURE_I2C_BUS BUS_I2C2
60 #define USE_BARO
61 #define BARO_I2C_BUS BUS_I2C1
62 #define USE_BARO_MS5611
64 #define PITOT_I2C_BUS BUS_I2C2
66 #define USE_RANGEFINDER
67 #define RANGEFINDER_I2C_BUS BUS_I2C2
69 #define M25P16_CS_PIN PB3
70 #define M25P16_SPI_BUS BUS_SPI3
72 #define USE_FLASHFS
73 #define USE_FLASH_M25P16
75 #define USE_VCP
76 #define VBUS_SENSING_PIN PC5
77 #define VBUS_SENSING_ENABLED
79 #define USE_UART_INVERTER
81 #define USE_UART1
82 #define UART1_RX_PIN PA10
83 #define UART1_TX_PIN PA9
84 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
85 // PC0 used as inverter select GPIO
86 #define INVERTER_PIN_UART1_RX PC0
88 #define USE_UART3
89 #define I2C_DEVICE_2_SHARES_UART3
90 #define UART3_RX_PIN PB11
91 #define UART3_TX_PIN PB10
93 #define USE_UART6
94 #define UART6_RX_PIN PC7
95 #define UART6_TX_PIN PC6
97 // #define USE_SOFTSERIAL1
98 // #define SOFTSERIAL_1_RX_PIN PC8
99 // #define SOFTSERIAL_1_TX_PIN PC9
101 #define SERIAL_PORT_COUNT 4 //VCP, USART1, USART3, USART6
103 #define USE_SPI
105 #define USE_SPI_DEVICE_1
107 #define USE_SPI_DEVICE_3
108 #define SPI3_NSS_PIN PB3
109 #define SPI3_SCK_PIN PC10
110 #define SPI3_MISO_PIN PC11
111 #define SPI3_MOSI_PIN PC12
113 #define USE_I2C
114 #define USE_I2C_DEVICE_1
115 #define USE_I2C_DEVICE_2
117 #define USE_ADC
118 #define ADC_CHANNEL_1_PIN PC1
119 #define ADC_CHANNEL_2_PIN PC2
120 #define ADC_CHANNEL_3_PIN PA0
121 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
122 #define VBAT_ADC_CHANNEL ADC_CHN_2
123 #define RSSI_ADC_CHANNEL ADC_CHN_3
126 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
128 #define USE_LED_STRIP
129 #define WS2811_PIN PA1
131 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
133 #define MAG_GPS_ALIGN CW180_DEG_FLIP
135 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
136 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
138 #define USE_SPEKTRUM_BIND
139 #define BIND_PIN PB11 //UART3_RX_PIN
141 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
143 // Number of available PWM outputs
144 #define MAX_PWM_OUTPUT_PORTS 10
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 #define PCA9685_I2C_BUS BUS_I2C2