New SPI API supporting DMA
[betaflight.git] / src / main / target / HAKRCF411 / target.h
blobdbf4b14401bc218c8ccd5c043072fb24d3229d0f
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 USE_EXTI
55 #define USE_GYRO_EXTI
56 #define GYRO_1_EXTI_PIN PB2
57 #define USE_MPU_DATA_READY_SIGNAL
59 #define USE_GYRO
60 #define USE_ACC
62 #define GYRO_1_CS_PIN PA4
63 #define GYRO_1_SPI_INSTANCE SPI1
65 #define USE_GYRO_SPI_ICM20689
66 #define GYRO_1_ALIGN CW270_DEG
68 #define USE_ACC_SPI_ICM20689
70 #define USE_GYRO_SPI_MPU6000
72 #define USE_ACC_SPI_MPU6000
75 #define LED0_PIN PC13
77 #define USE_VCP
79 #define USE_UART1
80 #define UART1_RX_PIN PA10
81 #define UART1_TX_PIN PA9
83 #define USE_UART2
84 #define UART2_RX_PIN PA3
85 #define UART2_TX_PIN PA2
87 #define USE_SOFTSERIAL1
88 #define USE_SOFTSERIAL2
90 #define SERIAL_PORT_COUNT 5
92 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
93 #define SERIALRX_PROVIDER SERIALRX_SBUS
96 #define USE_GPS
97 #define USE_GPS_UBLOX
98 #define USE_GPS_NMEA
100 #define USE_SPI_DEVICE_2
101 #define SPI3_SCK_PIN PB13
102 #define SPI3_MISO_PIN PB14
103 #define SPI3_MOSI_PIN PB15
105 #define USE_OSD
106 #define USE_MAX7456
107 #define MAX7456_SPI_INSTANCE SPI2
108 #define MAX7456_SPI_CS_PIN PB12
110 #define USE_ADC
111 #define VBAT_ADC_PIN PA0
112 #define CURRENT_METER_ADC_PIN PA1
115 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
116 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
118 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
120 #define USE_BEEPER
121 #define BEEPER_PIN PC14
122 #define BEEPER_INVERTED
124 #define USE_ESCSERIAL
125 #define ESCSERIAL_TIMER_TX_PIN PA3
127 #define INVERTER_PIN_UART1 PB4
129 #define TARGET_IO_PORTA 0xffff
130 #define TARGET_IO_PORTB 0xffff
131 #define TARGET_IO_PORTC 0xffff
132 #define TARGET_IO_PORTD 0xffff
135 #define USABLE_TIMER_CHANNEL_COUNT 8
136 #define USED_TIMERS (TIM_N(1)|TIM_N(2)|TIM_N(3)|TIM_N(4))