Update header
[inav.git] / src / main / target / REVO / target.h
blob29619624dff86330eea440fd0cdb80d2e1716950
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
35 #define USE_IMU_MPU6000
36 #define IMU_MPU6000_ALIGN CW270_DEG
37 #define MPU6000_CS_PIN PA4
38 #define MPU6000_SPI_BUS BUS_SPI1
40 #define USE_MAG
41 #define USE_DUAL_MAG
42 #define MAG_I2C_BUS_EXT BUS_I2C2
43 #define MAG_I2C_BUS_INT BUS_I2C1
44 #define USE_MAG_HMC5883
45 #define USE_MAG_QMC5883
46 #define USE_MAG_IST8310
47 #define USE_MAG_IST8308
48 #define USE_MAG_MAG3110
49 #define USE_MAG_LIS3MDL
51 #define TEMPERATURE_I2C_BUS BUS_I2C2
53 #define USE_BARO
54 #define BARO_I2C_BUS BUS_I2C1
55 #define USE_BARO_MS5611
57 #define PITOT_I2C_BUS BUS_I2C2
59 #define USE_RANGEFINDER
60 #define RANGEFINDER_I2C_BUS BUS_I2C2
62 #define M25P16_CS_PIN PB3
63 #define M25P16_SPI_BUS BUS_SPI3
65 #define USE_FLASHFS
66 #define USE_FLASH_M25P16
68 #define USE_VCP
69 #define VBUS_SENSING_PIN PC5
70 #define VBUS_SENSING_ENABLED
72 #define USE_UART_INVERTER
74 #define USE_UART1
75 #define UART1_RX_PIN PA10
76 #define UART1_TX_PIN PA9
77 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
78 // PC0 used as inverter select GPIO
79 #define INVERTER_PIN_UART1_RX PC0
81 #define USE_UART3
82 #define I2C_DEVICE_2_SHARES_UART3
83 #define UART3_RX_PIN PB11
84 #define UART3_TX_PIN PB10
86 #define USE_UART6
87 #define UART6_RX_PIN PC7
88 #define UART6_TX_PIN PC6
90 // #define USE_SOFTSERIAL1
91 // #define SOFTSERIAL_1_RX_PIN PC8
92 // #define SOFTSERIAL_1_TX_PIN PC9
94 #define SERIAL_PORT_COUNT 4 //VCP, USART1, USART3, USART6
96 #define USE_SPI
98 #define USE_SPI_DEVICE_1
100 #define USE_SPI_DEVICE_3
101 #define SPI3_NSS_PIN PB3
102 #define SPI3_SCK_PIN PC10
103 #define SPI3_MISO_PIN PC11
104 #define SPI3_MOSI_PIN PC12
106 #define USE_I2C
107 #define USE_I2C_DEVICE_1
108 #define USE_I2C_DEVICE_2
110 #define USE_ADC
111 #define ADC_CHANNEL_1_PIN PC1
112 #define ADC_CHANNEL_2_PIN PC2
113 #define ADC_CHANNEL_3_PIN PA0
114 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
115 #define VBAT_ADC_CHANNEL ADC_CHN_2
116 #define RSSI_ADC_CHANNEL ADC_CHN_3
119 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
121 #define USE_LED_STRIP
122 #define WS2811_PIN PA1
124 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
126 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
127 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
129 #define USE_SPEKTRUM_BIND
130 #define BIND_PIN PB11 //UART3_RX_PIN
132 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
134 // Number of available PWM outputs
135 #define MAX_PWM_OUTPUT_PORTS 10
137 #define TARGET_IO_PORTA 0xffff
138 #define TARGET_IO_PORTB 0xffff
139 #define TARGET_IO_PORTC 0xffff
140 #define TARGET_IO_PORTD 0xffff