Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / src / main / target / RG_SSD_F3 / target.h
blobadb9b9c39ff1c3bf2a628004052545b2aa53cf04
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "RGF3" // rgSSD_F3
25 #define LED0_PIN PC1
26 #define LED1_PIN PC0
28 #define USE_BEEPER
29 #define BEEPER_PIN PA8
30 #define BEEPER_INVERTED
32 #define GYRO_1_CS_PIN PB2
33 #define GYRO_1_SPI_INSTANCE SPI2
35 #define USE_SPI
36 #define USE_SPI_DEVICE_1
37 #define USE_SPI_DEVICE_2
39 #define SPI1_NSS_PIN PB12
40 #define SPI1_SCK_PIN PB3
41 #define SPI1_MISO_PIN PB4
42 #define SPI1_MOSI_PIN PB5
44 #define SPI2_NSS_PIN PB2
45 #define SPI2_SCK_PIN PB13
46 #define SPI2_MISO_PIN PB14
47 #define SPI2_MOSI_PIN PB15
50 #define USE_GYRO
51 #define USE_GYRO_SPI_MPU6000
52 #define GYRO_1_ALIGN CW180_DEG
54 #define USE_ACC
55 #define USE_ACC_SPI_MPU6000
56 #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
57 #define USE_TARGET_CONFIG
59 #define USE_EXTI
60 #define USE_GYRO_EXTI
61 #define GYRO_1_EXTI_PIN PC13
62 #define USE_MPU_DATA_READY_SIGNAL
63 #define ENSURE_MPU_DATA_READY_IS_LOW
65 #define USE_SDCARD
66 #define USE_SDCARD_SPI
67 #define SDCARD_DETECT_INVERTED
68 #define SDCARD_DETECT_PIN PC14
69 #define SDCARD_SPI_INSTANCE SPI1
70 #define SDCARD_SPI_CS_GPIO GPIOB
71 #define SDCARD_SPI_CS_PIN SPI1_NSS_PIN
72 #define SDCARD_DMA_CHANNEL_TX DMA1_Channel3
73 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
75 #define USE_VCP
76 #define USE_UART1
77 #define USE_UART2
78 #define USE_UART3
79 #define USE_UART4
80 #define USE_UART5
81 #define USE_SOFTSERIAL1
82 #define USE_SOFTSERIAL2
84 #define SERIAL_PORT_COUNT 8
86 #define UART1_TX_PIN PC4
87 #define UART1_RX_PIN PC5
88 #define UART2_TX_PIN PA2
89 #define UART2_RX_PIN PA3
90 #define UART3_TX_PIN PB10
91 #define UART3_RX_PIN PB11
92 #define UART4_TX_PIN PC10
93 #define UART4_RX_PIN PC11
94 #define UART5_TX_PIN PC12
95 #define UART5_RX_PIN PD2
97 #define USE_I2C
98 #define USE_I2C_DEVICE_2
99 #define I2C_DEVICE (I2CDEV_2)
101 #define I2C2_SCL_GPIO GPIOA
102 #define I2C2_SCL_GPIO_AF GPIO_AF_4
103 #define I2C2_SCL_PIN GPIO_Pin_9
104 #define I2C2_SCL_PIN_SOURCE GPIO_PinSource9
105 #define I2C2_SDA_GPIO GPIOA
106 #define I2C2_SDA_GPIO_AF GPIO_AF_4
107 #define I2C2_SDA_PIN GPIO_Pin_10
108 #define I2C2_SDA_PIN_SOURCE GPIO_PinSource10
110 #define USE_ADC
111 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
113 #define ADC_INSTANCE ADC2
115 #define VBAT_ADC_PIN PA4
116 #define CURRENT_METER_ADC_PIN PA5
117 #define VBAT_SCALE_DEFAULT 119
119 #define USE_TRANSPONDER
121 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
123 #define REMAP_TIM16_DMA
124 #define REMAP_TIM17_DMA
125 #define ADC24_DMA_REMAP
127 // IO - stm32f303rc in 64pin package
128 #define TARGET_IO_PORTA 0xffff
129 #define TARGET_IO_PORTB 0xffff
130 #define TARGET_IO_PORTC 0xffff
131 #define TARGET_IO_PORTD (BIT(2))
132 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
134 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(16))
136 #define USABLE_TIMER_CHANNEL_COUNT 9