vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FF_FORTINIF4 / target.h
blob60f9c4cf15383cf0c7f9330de8c6dd805246f022
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 "FORT"
20 #define USBD_PRODUCT_STRING "FortiniF4"
21 #define USE_HARDWARE_REVISION_DETECTION
22 #define HW_PIN PC14
23 /*--------------LED----------------*/
24 #define LED0 PB5
25 #define LED1 PB6
26 /*---------------------------------*/
28 /*------------BEEPER---------------*/
29 #define BEEPER PB4
30 #define BEEPER_INVERTED
31 /*---------------------------------*/
33 /*----------CAMERA CONTROL---------*/
34 //#define CAMERA_CONTROL_PIN PB7
35 /*---------------------------------*/
37 #define MPU6500_CS_PIN PA8
38 #define MPU6500_SPI_BUS BUS_SPI1
40 #define USE_IMU_MPU6500
41 #define IMU_MPU6500_ALIGN CW180_DEG
42 /*---------------------------------*/
44 /*------------FLASH----------------*/
45 #define M25P16_CS_PIN PB3
46 #define M25P16_SPI_BUS BUS_SPI3
48 #define USE_FLASHFS
49 #define USE_FLASH_M25P16
50 /*---------------------------------*/
52 /*-------------OSD-----------------*/
53 #define USE_MAX7456
54 #define MAX7456_SPI_BUS BUS_SPI3
55 #define MAX7456_CS_PIN PB3
56 //#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
57 //#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
58 /*---------------------------------*/
60 /*-----------USB-UARTs-------------*/
61 #define USB_IO
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
72 #define USE_UART3
73 #define UART3_RX_PIN PB11
74 #define UART3_TX_PIN PB10
75 #define INVERTER_PIN_UART3_RX PC15
77 #define USE_UART4
78 #define UART4_TX_PIN PA0
79 #define UART4_RX_PIN PA1
81 #define USE_UART5
82 #define UART5_RX_PIN PD2
83 #define UART5_TX_PIN NONE
85 #define USE_UART6
86 #define UART6_RX_PIN PC7
87 #define UART6_TX_PIN PC6
89 #define SERIAL_PORT_COUNT 6
91 #define USE_CMS
92 #define USE_MSP_DISPLAYPORT
93 /*---------------------------------*/
95 /*-------------SPIs----------------*/
96 #define USE_SPI
98 #define USE_SPI_DEVICE_1
99 #define SPI1_NSS_PIN PA8
100 #define SPI1_SCK_PIN PA5
101 #define SPI1_MISO_PIN PA6
102 #define SPI1_MOSI_PIN PA7
104 #define USE_SPI_DEVICE_3
105 #define SPI3_NSS_PIN PB3
106 #define SPI3_SCK_PIN PC10
107 #define SPI3_MISO_PIN PC11
108 #define SPI3_MOSI_PIN PC12
109 /*---------------------------------*/
111 /*-------------ADCs----------------*/
112 #define USE_ADC
113 #define ADC_CHANNEL_1_PIN PC2
114 #define ADC_CHANNEL_2_PIN PC1
115 #define VBAT_ADC_CHANNEL ADC_CHN_1
116 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
117 /*---------------------------------*/
119 /*-----------LED Strip-------------*/
120 #define USE_LED_STRIP
121 #define WS2811_PIN PB7
122 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_ST2_HANDLER
123 #define WS2811_DMA_STREAM DMA1_Stream2
124 #define WS2811_DMA_CHANNEL DMA_Channel_3
125 /*---------------------------------*/
127 /*-------------ESCs----------------*/
128 #define USE_ESC_SENSOR
129 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
130 #define USE_ESCSERIAL
131 #define ESCSERIAL_TIMER_TX_PIN PB0 // (HARDARE=0)
132 /*---------------------------------*/
134 /*--------DEFAULT VALUES-----------*/
135 #define SERIALRX_PROVIDER SERIALRX_SBUS
136 #define SERIALRX_UART SERIAL_PORT_USART3
138 #define TARGET_IO_PORTA 0xffff
139 #define TARGET_IO_PORTB 0xffff
140 #define TARGET_IO_PORTC 0xffff
141 #define TARGET_IO_PORTD (BIT(2))
142 /*---------------------------------*/
144 /*--------SPEKTRUM BIND---------.--*/
145 #define USE_SPEKTRUM_BIND
146 #define BIND_PIN UART3_RX_PIN
147 /*---------------------------------*/
149 /*--------------TIMERS-------------*/
150 #define MAX_PWM_OUTPUT_PORTS 6
151 /*---------------------------------*/