add h7 support to spi ll driver, drop hal version
[inav.git] / src / main / target / BLUEJAYF4 / target.h
blobd40c9314110a30e01bdc005373ca012b26e353b0
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
19 #define TARGET_BOARD_IDENTIFIER "BJF4"
21 #define USBD_PRODUCT_STRING "BlueJayF4"
23 #define USE_HARDWARE_REVISION_DETECTION
24 #define HW_PIN PB2
26 #define BOARD_HAS_VOLTAGE_DIVIDER
27 #define USE_EXTI
29 #define LED0 PB6
30 #define LED1 PB5
31 #define LED2 PB4
33 #define BEEPER PC1
34 #define BEEPER_OPT PB7
35 #define BEEPER_INVERTED
37 // MPU6500 interrupt
38 #define USE_MPU_DATA_READY_SIGNAL
39 #define GYRO_INT_EXTI PC5
40 #define MPU6500_CS_PIN PC4
41 #define MPU6500_SPI_BUS BUS_SPI1
43 #define USE_IMU_MPU6500
44 #define IMU_MPU6500_ALIGN CW0_DEG
46 #define USE_MAG
47 #define MAG_I2C_BUS BUS_I2C1
48 #define USE_MAG_HMC5883
49 #define USE_MAG_QMC5883
50 #define USE_MAG_IST8310
51 #define USE_MAG_IST8308
52 #define USE_MAG_MAG3110
53 #define USE_MAG_LIS3MDL
55 #define TEMPERATURE_I2C_BUS BUS_I2C1
56 #define BNO055_I2C_BUS BUS_I2C1
58 #define USE_BARO
59 #define BARO_I2C_BUS BUS_I2C1
60 #define USE_BARO_BMP085
61 #define USE_BARO_BMP280
62 #define USE_BARO_MS5611
64 #define USE_SDCARD
65 #define USE_SDCARD_SPI
66 #define SDCARD_DETECT_INVERTED
67 #define SDCARD_DETECT_PIN PD2
68 #define SDCARD_SPI_BUS BUS_SPI3
69 #define SDCARD_CS_PIN PA15
71 #define M25P16_CS_PIN PB7
72 #define M25P16_SPI_BUS BUS_SPI3
74 #define USE_FLASHFS
75 #define USE_FLASH_M25P16
77 #define USE_VCP
78 //#define VBUS_SENSING_PIN PA8
79 //#define VBUS_SENSING_ENABLED
81 #define USE_UART_INVERTER
83 #define USE_UART1
84 #define UART1_RX_PIN PA10
85 #define UART1_TX_PIN PA9
86 //#define INVERTER_PIN_UART1_TX PC9
88 #define USE_UART3
89 #define UART3_RX_PIN PB11
90 #define UART3_TX_PIN PB10
92 #define USE_UART6
93 #define UART6_RX_PIN PC7
94 #define UART6_TX_PIN PC6
95 #define INVERTER_PIN_UART6_RX PB15
97 #define USE_SOFTSERIAL1
98 #define SERIAL_PORT_COUNT 5
100 #define SOFTSERIAL_1_RX_PIN PB1
101 #define SOFTSERIAL_1_TX_PIN PB0
104 #define USE_ESCSERIAL
105 #define ESCSERIAL_TIMER_TX_HARDWARE 0
107 #define USE_SPI
109 #define USE_SPI_DEVICE_1
110 #define SPI1_NSS_PIN PC4
111 #define SPI1_SCK_PIN PA5
112 #define SPI1_MISO_PIN PA6
113 #define SPI1_MOSI_PIN PA7
115 #define USE_SPI_DEVICE_3
116 #define SPI3_NSS_PIN PB3
117 #define SPI3_SCK_PIN PC10
118 #define SPI3_MISO_PIN PC11
119 #define SPI3_MOSI_PIN PC12
121 #define USE_I2C
122 #define USE_I2C_DEVICE_1
123 #define USE_I2C_PULLUP
125 #define USE_ADC
126 #define ADC_CHANNEL_1_PIN PC3
127 #define VBAT_ADC_CHANNEL ADC_CHN_1
129 #define USE_LED_STRIP
130 #define WS2811_PIN PB1
132 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
134 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
135 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
137 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
139 #define USE_SPEKTRUM_BIND
140 #define BIND_PIN PB11
142 // Number of available PWM outputs
143 #define MAX_PWM_OUTPUT_PORTS 6
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD (BIT(2))