Add extra delays when cold-booting the UAV (#517)
[betaflight.git] / src / main / target / REVO / target.h
blobdce3f11f9b5055a44478082fe0cbd18a6ca3585a
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 CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
24 #define USBD_PRODUCT_STRING "Revolution"
25 #ifdef OPBL
26 #define USBD_SERIALNUMBER_STRING "0x8020000"
27 #endif
29 #define LED0 PB5
30 #define LED1 PB4
32 #define BEEPER PB4
34 #define INVERTER PC0 // PC0 used as inverter select GPIO
35 #define INVERTER_USART USART1
37 // MPU6000 interrupts
38 #define USE_EXTI
39 #define MPU_INT_EXTI PC4
40 #define USE_MPU_DATA_READY_SIGNAL
42 #define MPU6000_CS_PIN PA4
43 #define MPU6000_SPI_INSTANCE SPI1
45 #define GYRO
46 #define USE_GYRO_SPI_MPU6000
47 #define ACC_MPU6000_ALIGN CW270_DEG
49 #define ACC
50 #define USE_ACC_SPI_MPU6000
51 #define GYRO_MPU6000_ALIGN CW270_DEG
53 #define MAG
54 #define USE_MAG_HMC5883
55 #define MAG_HMC5883_ALIGN CW90_DEG
57 //#define USE_MAG_DATA_READY_SIGNAL
58 //#define ENSURE_MAG_DATA_READY_IS_HIGH
59 //#define MAG_INT_EXTI PB7
61 //#define USE_MAG_NAZA
62 //#define MAG_NAZA_ALIGN CW180_DEG_FLIP
64 #define BARO
65 #define USE_BARO_MS5611
67 //#define PITOT
68 //#define USE_PITOT_MS4525
69 #define PITOT_I2C_INSTANCE I2C_DEVICE_EXT
71 #define M25P16_CS_PIN PB3
72 #define M25P16_SPI_INSTANCE SPI3
74 #define USE_FLASHFS
75 #define USE_FLASH_M25P16
77 #define USE_VCP
78 #define VBUS_SENSING_PIN PC5
79 #define VBUS_SENSING_ENABLED
81 #define USE_UART1
82 #define UART1_RX_PIN PA10
83 #define UART1_TX_PIN PA9
84 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
86 #define USE_UART3
87 #define UART3_RX_PIN PB11
88 #define UART3_TX_PIN PB10
90 #define USE_UART6
91 #define UART6_RX_PIN PC7
92 #define UART6_TX_PIN PC6
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 I2C_DEVICE (I2CDEV_1)
108 #define I2C_DEVICE_EXT (I2CDEV_2)
110 #define USE_ADC
111 #define CURRENT_METER_ADC_PIN PC1
112 #define VBAT_ADC_PIN PC2
113 #define RSSI_ADC_GPIO_PIN PA0
115 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
117 #define LED_STRIP
118 // LED Strip can run off Pin 6 (PA0) of the ESC outputs.
119 #define WS2811_PIN PA0
120 #define WS2811_TIMER TIM5
121 #define WS2811_TIMER_CHANNEL TIM_Channel_1
122 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_ST2_HANDLER
123 #define WS2811_DMA_STREAM DMA1_Stream2
124 #define WS2811_DMA_FLAG DMA_FLAG_TCIF2
125 #define WS2811_DMA_IT DMA_IT_TCIF2
126 #define WS2811_DMA_CHANNEL DMA_Channel_6
127 #define WS2811_DMA_IRQ DMA1_Stream2_IRQn
129 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
131 #define MAG_GPS_ALIGN CW180_DEG_FLIP
133 #define NAV
134 #define NAV_AUTO_MAG_DECLINATION
135 #define NAV_GPS_GLITCH_DETECTION
137 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
138 #define DEFAULT_FEATURES (FEATURE_BLACKBOX)
140 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
142 // Number of available PWM outputs
143 #define MAX_PWM_OUTPUT_PORTS 11
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD 0xffff
150 #define USABLE_TIMER_CHANNEL_COUNT 12
151 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9) )