Merge pull request #10542 from iNavFlight/mmosca-bmp390
[inav.git] / src / main / target / FOXEERH743 / target.h
blobf2e2f83eb404993663e38ba89e84c13f0f68c242
1 /*
2 * This file is part of INAV.
4 * INAV 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 * INAV 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 INAV. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "F743"
21 #define USBD_PRODUCT_STRING "FOXEERH743"
23 #define USE_TARGET_CONFIG
25 #define LED0 PC13
27 #define BEEPER PD2
28 #define BEEPER_INVERTED
30 // *************** SPI1 OSD ****************
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
33 #define SPI1_SCK_PIN PA5
34 #define SPI1_MISO_PIN PA6
35 #define SPI1_MOSI_PIN PA7
37 #define USE_MAX7456
38 #define MAX7456_SPI_BUS BUS_SPI1
39 #define MAX7456_CS_PIN PA4
41 // *************** SPI2 Gyro ***********************
42 #define USE_SPI_DEVICE_2
43 #define SPI2_SCK_PIN PB13
44 #define SPI2_MISO_PIN PB14
45 #define SPI2_MOSI_PIN PB15
47 #define USE_IMU_MPU6000
48 #define IMU_MPU6000_ALIGN CW0_DEG
49 #define MPU6000_SPI_BUS BUS_SPI2
50 #define MPU6000_CS_PIN PB12
52 // *************** SPI3 FLASH ***********************
53 #define USE_SPI_DEVICE_3
54 #define SPI3_SCK_PIN PC10
55 #define SPI3_MISO_PIN PC11
56 #define SPI3_MOSI_PIN PC12
57 #define SPI3_NSS_PIN PA15
59 #define M25P16_SPI_BUS BUS_SPI3
60 #define M25P16_CS_PIN SPI3_NSS_PIN
62 #define W25N01G_SPI_BUS BUS_SPI3
63 #define W25N01G_CS_PIN SPI3_NSS_PIN
65 #define USE_BLACKBOX
66 #define USE_FLASHFS
67 #define USE_FLASH_M25P16
68 #define USE_FLASH_W25N01G
69 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
71 // *************** I2C /Baro/Mag *********************
72 #define USE_I2C
73 #define USE_I2C_DEVICE_1
74 #define I2C1_SCL PB8
75 #define I2C1_SDA PB9
77 #define USE_BARO
78 #define BARO_I2C_BUS BUS_I2C1
79 #define USE_BARO_BMP280
80 #define USE_BARO_MS5611
81 #define USE_BARO_DPS310
82 #define USE_BARO_SPL06
84 #define USE_MAG
85 #define MAG_I2C_BUS BUS_I2C1
86 #define USE_MAG_ALL
88 #define TEMPERATURE_I2C_BUS BUS_I2C1
89 #define PITOT_I2C_BUS BUS_I2C1
91 #define USE_RANGEFINDER
92 #define RANGEFINDER_I2C_BUS BUS_I2C1
94 // *************** UART *****************************
95 #define USE_VCP
97 #define USE_UART1
98 #define UART1_TX_PIN PA9
99 #define UART1_RX_PIN PA10
101 #define USE_UART2
102 #define UART2_TX_PIN PA2
103 #define UART2_RX_PIN PA3
105 #define USE_UART3
106 #define UART3_TX_PIN PB10
107 #define UART3_RX_PIN PB11
109 #define USE_UART4
110 #define UART4_TX_PIN PA0
111 #define UART4_RX_PIN PA1
113 #define USE_UART6
114 #define UART6_TX_PIN PC6
115 #define UART6_RX_PIN PC7
117 #define USE_UART7
118 #define UART7_TX_PIN PE8
119 #define UART7_RX_PIN PE7
121 #define USE_UART8
122 #define UART8_TX_PIN PE1
123 #define UART8_RX_PIN PE0
125 #define SERIAL_PORT_COUNT 8
127 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
128 #define SERIALRX_PROVIDER SERIALRX_SBUS
130 // *************** ADC *****************************
131 #define USE_ADC
132 #define ADC_INSTANCE ADC3
134 #define ADC_CHANNEL_1_PIN PC3
135 #define ADC_CHANNEL_2_PIN PC5
136 #define ADC_CHANNEL_3_PIN PC2
138 #define VBAT_ADC_CHANNEL ADC_CHN_1
139 #define RSSI_ADC_CHANNEL ADC_CHN_2
140 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
142 // *************** LEDSTRIP ************************
143 #define USE_LED_STRIP
144 #define WS2811_PIN PA8
146 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
147 #define CURRENT_METER_SCALE 100
149 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
151 #define TARGET_IO_PORTA 0xffff
152 #define TARGET_IO_PORTB 0xffff
153 #define TARGET_IO_PORTC 0xffff
154 #define TARGET_IO_PORTD 0xffff
155 #define TARGET_IO_PORTE 0xffff
157 #define MAX_PWM_OUTPUT_PORTS 8
158 #define USE_DSHOT
159 #define USE_ESC_SENSOR