Removing default beeper inversion from revolt
[betaflight.git] / src / main / target / REVO / target.h
blob341c73dfa66930fa8fd729d60c01f27e3ad8dd17
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 CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
22 #if defined(AIRBOTF4)
23 #define TARGET_BOARD_IDENTIFIER "AIR4"
24 #define USBD_PRODUCT_STRING "AirbotF4"
26 #elif defined(REVOLT)
27 #define TARGET_BOARD_IDENTIFIER "RVLT"
28 #define USBD_PRODUCT_STRING "Revolt"
30 #else
31 #define TARGET_BOARD_IDENTIFIER "REVO"
32 #define USBD_PRODUCT_STRING "Revolution"
34 #ifdef OPBL
35 #define USBD_SERIALNUMBER_STRING "0x8020000"
36 #endif
38 #endif
40 #define USE_DSHOT
42 #define LED0 PB5
43 // Disable LED1, conflicts with AirbotF4/Flip32F4/Revolt beeper
44 #if defined(AIRBOTF4)
45 #define BEEPER PB4
46 #define BEEPER_INVERTED
47 #elif defined(REVOLT)
48 #define BEEPER PB4
49 #else
50 #define LED1 PB4
51 // Leave beeper here but with none as io - so disabled unless mapped.
52 #define BEEPER NONE
53 #endif
55 // PC0 used as inverter select GPIO
56 #define INVERTER PC0
57 #define INVERTER_USART USART1
59 #define MPU6000_CS_PIN PA4
60 #define MPU6000_SPI_INSTANCE SPI1
62 #define MPU6500_CS_PIN PA4
63 #define MPU6500_SPI_INSTANCE SPI1
65 #define ACC
66 #define USE_ACC_SPI_MPU6000
67 #define GYRO_MPU6000_ALIGN CW270_DEG
69 #define USE_ACC_MPU6500
70 #define USE_ACC_SPI_MPU6500
71 #define ACC_MPU6500_ALIGN CW270_DEG
73 #define GYRO
74 #define USE_GYRO_SPI_MPU6000
75 #define ACC_MPU6000_ALIGN CW270_DEG
77 #define USE_GYRO_MPU6500
78 #define USE_GYRO_SPI_MPU6500
79 #define GYRO_MPU9250_ALIGN CW270_DEG
81 // MPU6000 interrupts
82 #define USE_EXTI
83 #define MPU_INT_EXTI PC4
84 #define USE_MPU_DATA_READY_SIGNAL
86 #if !defined(AIRBOTF4) && !defined(REVOLT)
87 #define MAG
88 #define USE_MAG_HMC5883
89 #define MAG_HMC5883_ALIGN CW90_DEG
91 //#define USE_MAG_NAZA
92 //#define MAG_NAZA_ALIGN CW180_DEG_FLIP
94 #define BARO
95 #define USE_BARO_MS5611
97 //#define PITOT
98 //#define USE_PITOT_MS4525
99 //#define MS4525_BUS I2C_DEVICE_EXT
100 #endif
102 #define M25P16_CS_PIN PB3
103 #define M25P16_SPI_INSTANCE SPI3
105 #define USE_FLASHFS
106 #define USE_FLASH_M25P16
108 #define USE_VCP
109 #define VBUS_SENSING_PIN PC5
111 #define USE_UART1
112 #define UART1_RX_PIN PA10
113 #define UART1_TX_PIN PA9
114 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
116 #define USE_UART3
117 #define UART3_RX_PIN PB11
118 #define UART3_TX_PIN PB10
120 #define USE_UART6
121 #define UART6_RX_PIN PC7
122 #define UART6_TX_PIN PC6
124 #define SERIAL_PORT_COUNT 4 //VCP, USART1, USART3, USART6
126 #define USE_ESCSERIAL
127 #define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1
129 #define USE_SPI
131 #define USE_SPI_DEVICE_1
133 #define USE_SPI_DEVICE_3
134 #define SPI3_NSS_PIN PB3
135 #define SPI3_SCK_PIN PC10
136 #define SPI3_MISO_PIN PC11
137 #define SPI3_MOSI_PIN PC12
139 #define USE_I2C
140 #define I2C_DEVICE (I2CDEV_1)
142 #define USE_ADC
143 #define CURRENT_METER_ADC_PIN PC1
144 #define VBAT_ADC_PIN PC2
145 //#define RSSI_ADC_PIN PA0
147 #define LED_STRIP
149 #define SENSORS_SET (SENSOR_ACC)
151 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
152 #define DEFAULT_FEATURES (FEATURE_BLACKBOX)
154 #define SPEKTRUM_BIND
155 // USART3,
156 #define BIND_PIN PB11
158 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
160 #define TARGET_IO_PORTA 0xffff
161 #define TARGET_IO_PORTB 0xffff
162 #define TARGET_IO_PORTC 0xffff
163 #define TARGET_IO_PORTD (BIT(2))
165 #ifdef REVOLT
166 #define USABLE_TIMER_CHANNEL_COUNT 11
167 #else
168 #define USABLE_TIMER_CHANNEL_COUNT 12
169 #endif
171 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9) )
173 #define CMS
174 #define USE_MSP_DISPLAYPORT