Merge pull request #11714 from VitroidFPV/my-new-code
[betaflight.git] / src / main / target / HAKRCF411 / target.h
blobf49b0a1f7a010f49fe146d0a368fcd531d56ea3d
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/>.
22 #pragma once
24 #define TARGET_BOARD_IDENTIFIER "HK41"
25 #define USBD_PRODUCT_STRING "HAKRCF411"
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 // XXX CAMERA_CONTROL_PIN is deprecated.
44 // XXX Target maintainer must create a valid timerHardware[] array entry for PB5 with TIM_USE_CAMERA_CONTROL
45 //#define CAMERA_CONTROL_PIN PB5
47 #define USE_SPI
48 #define USE_SPI_DEVICE_1
50 #define SPI1_SCK_PIN PA5
51 #define SPI1_MISO_PIN PA6
52 #define SPI1_MOSI_PIN PA7
54 #define GYRO_1_EXTI_PIN PB2
56 #define USE_GYRO
57 #define USE_ACC
59 #define GYRO_1_CS_PIN PA4
60 #define GYRO_1_SPI_INSTANCE SPI1
62 #define USE_GYRO_SPI_ICM20689
63 #define GYRO_1_ALIGN CW270_DEG
65 #define USE_ACC_SPI_ICM20689
67 #define USE_GYRO_SPI_MPU6000
69 #define USE_ACC_SPI_MPU6000
72 #define LED0_PIN PC13
74 #define USE_VCP
76 #define USE_UART1
77 #define UART1_RX_PIN PA10
78 #define UART1_TX_PIN PA9
80 #define USE_UART2
81 #define UART2_RX_PIN PA3
82 #define UART2_TX_PIN PA2
84 #define USE_SOFTSERIAL1
85 #define USE_SOFTSERIAL2
87 #define SERIAL_PORT_COUNT 5
89 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
90 #define SERIALRX_PROVIDER SERIALRX_SBUS
93 #define USE_GPS
94 #define USE_GPS_UBLOX
95 #define USE_GPS_NMEA
97 #define USE_SPI_DEVICE_2
98 #define SPI3_SCK_PIN PB13
99 #define SPI3_MISO_PIN PB14
100 #define SPI3_MOSI_PIN PB15
102 #define USE_OSD
103 #define USE_MAX7456
104 #define MAX7456_SPI_INSTANCE SPI2
105 #define MAX7456_SPI_CS_PIN PB12
107 #define USE_ADC
108 #define VBAT_ADC_PIN PA0
109 #define CURRENT_METER_ADC_PIN PA1
112 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
113 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
115 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
117 #define USE_BEEPER
118 #define BEEPER_PIN PC14
119 #define BEEPER_INVERTED
121 #define USE_ESCSERIAL
122 #define ESCSERIAL_TIMER_TX_PIN PA3
124 #define INVERTER_PIN_UART1 PB4
126 #define TARGET_IO_PORTA 0xffff
127 #define TARGET_IO_PORTB 0xffff
128 #define TARGET_IO_PORTC 0xffff
129 #define TARGET_IO_PORTD 0xffff
132 #define USABLE_TIMER_CHANNEL_COUNT 8
133 #define USED_TIMERS (TIM_N(1)|TIM_N(2)|TIM_N(3)|TIM_N(4))