Populate unified targets as separate target folders
[betaflight.git] / src / main / target / HAKRCF722 / target.h
blob5b36b02b8f0e9d996c477a522c3e30ee59f26eea
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 "HRF7"
25 #define USBD_PRODUCT_STRING "HAKRCF722"
28 #define USE_I2C
29 #define USE_I2C_DEVICE_1
30 #define I2C_DEVICE (I2CDEV_1)
31 #define I2C1_SCL PB8
32 #define I2C1_SDA PB9
33 #define USE_I2C_PULLUP
35 #define USE_BARO
36 #define USE_BARO_BMP085
37 #define USE_BARO_BMP280
38 #define USE_BARO_MS5611
39 #define USE_BARO_QMP6988
40 #define BARO_I2C_INSTANCE (I2CDEV_1)
41 #define DEFAULT_BARO_QMP6988
43 #define USE_SPI
44 #define USE_SPI_DEVICE_1
46 #define SPI1_SCK_PIN PB3
47 #define SPI1_MISO_PIN PA6
48 #define SPI1_MOSI_PIN PA7
50 #define GYRO_1_CS_PIN PA4
51 #define GYRO_1_SPI_INSTANCE SPI1
53 #define GYRO_1_EXTI_PIN PC4
55 #define USE_GYRO
56 #define USE_GYRO_SPI_MPU6000
57 #define GYRO_1_ALIGN CW270_DEG
59 #define USE_ACC
60 #define USE_ACC_SPI_MPU6000
62 #define LED0_PIN PC13
64 #define USE_SPI_DEVICE_3
65 #define SPI3_SCK_PIN PC10
66 #define SPI3_MISO_PIN PC11
67 #define SPI3_MOSI_PIN PB5
69 #define USE_OSD
70 #define USE_MAX7456
71 #define MAX7456_SPI_INSTANCE SPI3
72 #define MAX7456_SPI_CS_PIN PA15
74 #define USE_SPI_DEVICE_2
75 #define SPI2_SCK_PIN PB13
76 #define SPI2_MISO_PIN PB14
77 #define SPI2_MOSI_PIN PC3
79 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
80 #define USE_FLASHFS
81 #define USE_FLASH_M25P16
82 #define FLASH_CS_PIN PB12
83 #define FLASH_SPI_INSTANCE SPI2
85 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
87 #define USE_VCP
89 #define USE_UART1
90 #define UART1_RX_PIN PB7
91 #define UART1_TX_PIN PA9
93 #define USE_UART2
94 #define UART2_RX_PIN PA3
95 #define UART2_TX_PIN PA2
97 #define USE_UART3
98 #define UART3_RX_PIN PB11
99 #define UART3_TX_PIN PB10
101 #define USE_UART4
102 #define UART4_RX_PIN PA1
103 #define UART4_TX_PIN PA0
105 #define USE_UART5
106 #define UART5_RX_PIN PD2
107 #define UART5_TX_PIN PC12
109 #define USE_SOFTSERIAL1
110 #define USE_SOFTSERIAL2
112 #define SERIAL_PORT_COUNT 8
114 #define USE_BEEPER
115 #define BEEPER_PIN PC14
116 #define BEEPER_INVERTED
118 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
119 #define SERIALRX_UART SERIAL_PORT_USART1
120 #define SERIALRX_PROVIDER SERIALRX_SBUS
122 #define USE_ADC
123 #define ADC_INSTANCE ADC1 // Default added
124 #define ADC1_DMA_OPT 0 // DMA 2 Stream 0 Channel 0
126 #define VBAT_ADC_PIN PC1
127 #define CURRENT_METER_ADC_PIN PC2
128 #define RSSI_ADC_PIN PC0
130 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
131 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
133 #define USE_ESCSERIAL
134 #define ESCSERIAL_TIMER_TX_PIN PA3
136 #define TARGET_IO_PORTA 0xffff
137 #define TARGET_IO_PORTB 0xffff
138 #define TARGET_IO_PORTC 0xffff
139 #define TARGET_IO_PORTD 0xffff
141 #define USABLE_TIMER_CHANNEL_COUNT 9
142 #define USED_TIMERS (TIM_N(1)|TIM_N(2)|TIM_N(3)|TIM_N(4)|TIM_N(8)|TIM_N(12))