Merge pull request #10542 from iNavFlight/mmosca-bmp390
[inav.git] / src / main / target / AIRBOTF4 / target.h
blob9d5b0eef8bbee2bbb4a5d31364cfdbd1d2a8eae6
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
20 #define TARGET_BOARD_IDENTIFIER "ABF4"
21 #define USBD_PRODUCT_STRING "Airbot F4 / Flip32 F4"
23 #define LED0 PB5
25 #define BEEPER PB4
26 #define BEEPER_INVERTED
28 #define USE_I2C
29 #define USE_I2C_DEVICE_2
30 #define I2C_DEVICE_2_SHARES_UART3
32 #define USE_IMU_MPU6000
33 #define IMU_MPU6000_ALIGN CW270_DEG
34 #define MPU6000_CS_PIN PA4
35 #define MPU6000_SPI_BUS BUS_SPI1
37 #define USE_IMU_MPU6500
38 #define IMU_MPU6500_ALIGN CW270_DEG
39 #define MPU6500_CS_PIN PA4
40 #define MPU6500_SPI_BUS BUS_SPI1
42 #define USE_MAG
43 #define MAG_I2C_BUS BUS_I2C2
44 #define USE_MAG_ALL
46 #define USE_BARO
47 #define BARO_I2C_BUS BUS_I2C2
48 #define USE_BARO_BMP085
49 #define USE_BARO_BMP280
50 #define USE_BARO_MS5611
52 #define USE_PITOT_ADC
53 #define PITOT_I2C_BUS BUS_I2C2
54 #define TEMPERATURE_I2C_BUS BUS_I2C2
56 #define M25P16_CS_PIN PB3
57 #define M25P16_SPI_BUS BUS_SPI3
59 #define USE_FLASHFS
60 #define USE_FLASH_M25P16
62 #define USE_VCP
63 #define VBUS_SENSING_PIN PC5
64 #define VBUS_SENSING_ENABLED
66 #define USE_UART_INVERTER
68 #define USE_UART1
69 #define UART1_RX_PIN PA10
70 #define UART1_TX_PIN PA9
71 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
72 #define INVERTER_PIN_UART1_RX PC0 // PC0 used as inverter select GPIO
74 #define USE_UART3
75 #define UART3_RX_PIN PB11
76 #define UART3_TX_PIN PB10
78 #define USE_UART6
79 #define UART6_RX_PIN PC7
80 #define UART6_TX_PIN PC6
82 #define USE_SOFTSERIAL1
83 #define SOFTSERIAL_1_RX_PIN PC8
84 #define SOFTSERIAL_1_TX_PIN PC9
86 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART3, USART6, SOFTSERIAL1
88 #define USE_SPI
90 #define USE_SPI_DEVICE_1
92 #define USE_SPI_DEVICE_3
93 #define SPI3_NSS_PIN PB3
94 #define SPI3_SCK_PIN PC10
95 #define SPI3_MISO_PIN PC11
96 #define SPI3_MOSI_PIN PC12
98 #define USE_RANGEFINDER
99 #define RANGEFINDER_I2C_BUS BUS_I2C2
101 #define USE_ADC
102 #define ADC_CHANNEL_1_PIN PC1
103 #define ADC_CHANNEL_2_PIN PC2
104 #define ADC_CHANNEL_3_PIN PA0
105 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
106 #define VBAT_ADC_CHANNEL ADC_CHN_2
107 #define RSSI_ADC_CHANNEL ADC_CHN_3
109 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
111 #define USE_LED_STRIP
112 #define WS2811_PIN PA1
114 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
116 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
117 #define DISABLE_RX_PWM_FEATURE
118 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_VBAT)
120 #define USE_SPEKTRUM_BIND
121 #define BIND_PIN PB11 // USART3 RX
123 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
125 // Number of available PWM outputs
126 #define MAX_PWM_OUTPUT_PORTS 6
127 #define TARGET_MOTOR_COUNT 6
129 #define TARGET_IO_PORTA 0xffff
130 #define TARGET_IO_PORTB 0xffff
131 #define TARGET_IO_PORTC 0xffff
132 #define TARGET_IO_PORTD 0xffff
134 #define USE_DSHOT
135 #define USE_ESC_SENSOR