vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / IFLIGHT_JBF7PRO / target.h
blob570e1750e42047c5d9e924acc0961a4a1a8d3683
1 /*
2 * This file is part of INAV Project.
4 * INAV Project 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 Project 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 Project. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "IFJBF7"
22 #define USBD_PRODUCT_STRING "IFLIGHT_JBF7PRO"
24 #define LED0 PC15
27 #define BEEPER PC13
28 #define BEEPER_INVERTED
30 // *************** Gyro & ACC **********************
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
38 #define USE_IMU_MPU6000
39 #define IMU_MPU6000_ALIGN CW0_DEG
40 #define MPU6000_SPI_BUS BUS_SPI1
41 #define MPU6000_CS_PIN PA4
43 #define USE_IMU_BMI270
44 #define IMU_BMI270_ALIGN CW0_DEG
45 #define BMI270_SPI_BUS BUS_SPI1
46 #define BMI270_CS_PIN PA4
48 // *************** I2C/Baro/Mag *********************
49 #define USE_I2C
50 #define USE_I2C_DEVICE_1
51 #define I2C1_SCL PB8 // SCL pad
52 #define I2C1_SDA PB9 // SDA pad
54 #define USE_BARO
55 #define BARO_I2C_BUS BUS_I2C1
56 #define USE_BARO_BMP280
57 #define USE_BARO_DPS310
60 #define USE_MAG
61 #define MAG_I2C_BUS BUS_I2C1
62 #define USE_MAG_ALL
64 #define TEMPERATURE_I2C_BUS BUS_I2C1
65 #define PITOT_I2C_BUS BUS_I2C1
67 // *************** SD Card **************************
68 #define USE_SDCARD
69 #define USE_SDCARD_SPI
70 #define SDCARD_SPI_BUS BUS_SPI3
71 #define SDCARD_CS_PIN PA15
73 #define USE_SPI_DEVICE_3
74 #define SPI3_SCK_PIN PB3
75 #define SPI3_MISO_PIN PB4
76 #define SPI3_MOSI_PIN PB5
78 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
80 // *************** OSD *****************************
81 #define USE_SPI_DEVICE_2
82 #define SPI2_SCK_PIN PB13
83 #define SPI2_MISO_PIN PB14
84 #define SPI2_MOSI_PIN PC3
86 #define USE_MAX7456
87 #define MAX7456_SPI_BUS BUS_SPI2
88 #define MAX7456_CS_PIN PB12
90 // *************** PINIO ***************************
91 #define USE_PINIO
92 #define USE_PINIOBOX
93 #define PINIO1_PIN PC0
95 // *************** UART *****************************
96 #define USE_VCP
97 #define VBUS_SENSING_PIN PB2
98 #define VBUS_SENSING_ENABLED
100 #define USE_UART1
101 #define UART1_RX_PIN PA10
102 #define UART1_TX_PIN PA9
104 #define USE_UART2
105 #define UART2_RX_PIN PA3
106 #define UART2_TX_PIN PA2
108 #define USE_UART3
109 #define UART3_RX_PIN PC11
110 #define UART3_TX_PIN PC10
112 #define USE_UART4
113 #define UART4_RX_PIN PA1
114 #define UART4_TX_PIN PA0
116 #define USE_UART5
117 #define UART5_RX_PIN PD2
118 #define UART5_TX_PIN PC12
120 #define USE_UART6
121 #define UART6_RX_PIN PC7
122 #define UART6_TX_PIN NONE
124 #define SERIAL_PORT_COUNT 7
126 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
127 #define SERIALRX_PROVIDER SERIALRX_SBUS
128 #define SERIALRX_UART SERIAL_PORT_USART2
130 // *************** ADC *****************************
131 #define USE_ADC
132 #define ADC_INSTANCE ADC1
133 #define ADC1_DMA_STREAM DMA2_Stream0
134 #define ADC_CHANNEL_1_PIN PC2
135 #define ADC_CHANNEL_2_PIN PC1
136 #define VBAT_ADC_CHANNEL ADC_CHN_1
137 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
139 #define USE_RANGEFINDER
140 #define RANGEFINDER_I2C_BUS BUS_I2C1
142 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_LED_STRIP)
144 #define USE_LED_STRIP
145 #define WS2811_PIN PA8
147 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
149 #define TARGET_IO_PORTA 0xffff
150 #define TARGET_IO_PORTB 0xffff
151 #define TARGET_IO_PORTC 0xffff
152 #define TARGET_IO_PORTD (BIT(2))
154 #define MAX_PWM_OUTPUT_PORTS 8
155 #define USE_DSHOT
156 #define USE_ESC_SENSOR