vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / SPARKY2 / target.h
blob78f80cd609dd2c9273e40b46ebbd3dcea85db129
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 "SPK2"
21 #define USBD_PRODUCT_STRING "Sparky 2.0"
22 #ifdef OPBL
23 #define USBD_SERIALNUMBER_STRING "0x8020000"
24 #endif
26 #define LED0 PB5
27 #define LED1 PB4
28 #define LED2 PB6
30 #define BEEPER PC9
32 #define USE_IMU_MPU9250
33 #define IMU_MPU9250_ALIGN CW270_DEG
35 #define MPU9250_SPI_BUS BUS_SPI1
36 #define MPU9250_CS_PIN PC4
38 #define USE_MAG
40 #define MAG_I2C_BUS BUS_I2C1
42 #define USE_MAG_ALL
44 #define TEMPERATURE_I2C_BUS BUS_I2C1
46 #define USE_BARO
47 #define BARO_I2C_BUS BUS_I2C1
48 #define USE_BARO_MS5611
49 #define USE_BARO_BMP085
50 #define USE_BARO_BMP280
52 #define M25P16_CS_PIN PB3
53 #define M25P16_SPI_BUS BUS_SPI3
55 //#define RFM22B_CS_PIN PA15
56 //#define RFM22B_SPI_INSTANCE SPI3
58 #define USE_FLASHFS
59 #define USE_FLASH_M25P16
60 #define USE_FLASH_TOOLS
62 #define USE_VCP
63 #define VBUS_SENSING_PIN PA8
65 #define USE_UART_INVERTER
67 #define USE_UART1
68 #define UART1_RX_PIN PA10
69 #define UART1_TX_PIN PA9
71 #define USE_UART3
72 #define UART3_RX_PIN PB11
73 #define UART3_TX_PIN PB10
75 #define USE_UART6
76 #define UART6_RX_PIN PC7
77 #define UART6_TX_PIN PC6 //inverter
78 #define INVERTER_PIN_UART6_RX PC6
80 #define SERIAL_PORT_COUNT 4
82 #define USE_SPI
84 #define USE_SPI_DEVICE_1 //MPU9250
85 #define SPI1_NSS_PIN PC4
86 #define SPI1_SCK_PIN PA5
87 #define SPI1_MISO_PIN PA6
88 #define SPI1_MOSI_PIN PA7
90 #define USE_SPI_DEVICE_3 //dataflash
91 #define SPI3_NSS_PIN PB3
92 #define SPI3_SCK_PIN PC10
93 #define SPI3_MISO_PIN PC11
94 #define SPI3_MOSI_PIN PC12
96 #define USE_I2C
97 #define USE_I2C_DEVICE_1
98 #define USE_I2C_DEVICE_2
99 #define I2C_DEVICE_2_SHARES_UART3
101 #define USE_ADC
102 #define ADC_CHANNEL_1_PIN PC2
103 #define ADC_CHANNEL_2_PIN PC3
104 #define VBAT_ADC_CHANNEL ADC_CHN_2
105 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
107 // #define USE_LED_STRIP
108 // #define WS2811_PIN PA1
110 #define USE_RANGEFINDER
111 #define RANGEFINDER_I2C_BUS BUS_I2C2
113 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
114 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
115 #define SERIALRX_PROVIDER SERIALRX_SBUS
116 #define SERIALRX_UART SERIAL_PORT_USART3
118 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
120 #define MAX_PWM_OUTPUT_PORTS 11
122 #define TARGET_IO_PORTA 0xffff
123 #define TARGET_IO_PORTB 0xffff
124 #define TARGET_IO_PORTC 0xffff