vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / AIKONF4 / target.h
blobcd057f8b871ea2576ed10539c4bc9d3c80bdeca2
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "AIK4"
24 #define USBD_PRODUCT_STRING "AIKONF4"
26 #define LED0 PB5
27 #define BEEPER PB4
28 #define BEEPER_INVERTED
30 #define USE_IMU_MPU6000
31 #define IMU_MPU6000_ALIGN CW0_DEG
32 #define MPU6000_CS_PIN SPI1_NSS_PIN
33 #define MPU6000_SPI_BUS BUS_SPI1
35 #define USE_IMU_MPU6500
36 #define IMU_MPU6500_ALIGN CW0_DEG
37 #define MPU6500_CS_PIN SPI1_NSS_PIN
38 #define MPU6500_SPI_BUS BUS_SPI1
40 #define SERIAL_PORT_COUNT 7 //VCP, UART1, UART2, UART3, UART4, SOFTSERIAL1, SOFTSERIAL2
42 #define USE_UART_INVERTER
44 #define USE_VCP
45 #define VBUS_SENSING_PIN PD2
46 #define VBUS_SENSING_ENABLED
48 #define USE_UART1
49 #define UART1_RX_PIN PA10
50 #define UART1_TX_PIN PA9
51 #define INVERTER_PIN_UART1_RX PC0 // PC0 used as inverter select GPIO
53 #define USE_UART2
54 #define UART2_TX_PIN PA2
55 #define UART2_RX_PIN PA3
57 #define USE_UART3
58 #define UART3_RX_PIN PB11
59 #define UART3_TX_PIN PB10
61 #define USE_UART4
62 #define UART4_TX_PIN PA0
63 #define UART4_RX_PIN NONE
65 #define USE_SOFTSERIAL1
66 #define SOFTSERIAL_1_TX_PIN PA9
67 #define SOFTSERIAL_1_RX_PIN PA9
69 #define USE_SOFTSERIAL2
70 #define SOFTSERIAL_2_RX_PIN PA1
71 #define SOFTSERIAL_2_TX_PIN PA1
73 #define USE_I2C
74 #define USE_I2C_DEVICE_1
75 #define I2C1_SCL PB8
76 #define I2C1_SDA PB9
78 #define DEFAULT_I2C_BUS BUS_I2C1
79 #define EXTERNAL_I2C_BUS DEFAULT_I2C_BUS
81 #define USE_BARO
82 #define BARO_I2C_BUS DEFAULT_I2C_BUS
83 #define USE_BARO_BMP280
84 #define USE_BARO_MS5611
85 #define USE_BARO_BMP085
87 #define USE_MAG
88 #define MAG_I2C_BUS DEFAULT_I2C_BUS
89 #define USE_MAG_ALL
91 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
92 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
93 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
95 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
96 #define SERIALRX_PROVIDER SERIALRX_SBUS
97 #define SERIALRX_UART SERIAL_PORT_USART1
99 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_SOFTSERIAL)
101 #define USE_ADC
102 #define ADC_CHANNEL_1_PIN PC1
103 #define ADC_CHANNEL_2_PIN PC2
104 #define ADC_CHANNEL_3_PIN PC3
106 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
107 #define VBAT_ADC_CHANNEL ADC_CHN_2
108 #define RSSI_ADC_CHANNEL ADC_CHN_3
110 #define USE_SPI
111 #define USE_SPI_DEVICE_1
112 #define SPI1_NSS_PIN PA4
113 #define SPI1_SCK_PIN PA5
114 #define SPI1_MISO_PIN PA6
115 #define SPI1_MOSI_PIN PA7
117 #define USE_SPI_DEVICE_2
118 #define SPI2_NSS_PIN PB12
119 #define SPI2_SCK_PIN PB13
120 #define SPI2_MISO_PIN PB14
121 #define SPI2_MOSI_PIN PB15
123 #define USE_SPI_DEVICE_3
124 #define SPI3_NSS_PIN PA15
125 #define SPI3_SCK_PIN PC10
126 #define SPI3_MISO_PIN PC11
127 #define SPI3_MOSI_PIN PC12
129 #define MAX_PWM_OUTPUT_PORTS 6
131 #define TARGET_IO_PORTA 0xffff
132 #define TARGET_IO_PORTB 0xffff
133 #define TARGET_IO_PORTC 0xffff
134 #define TARGET_IO_PORTD 0xffff
136 #define USE_MAX7456
137 #define MAX7456_SPI_BUS BUS_SPI3
138 #define MAX7456_CS_PIN SPI3_NSS_PIN
140 #define USE_LED_STRIP
141 #define WS2811_PIN PB6
143 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
144 #define M25P16_CS_PIN SPI2_NSS_PIN
145 #define M25P16_SPI_BUS BUS_SPI2
146 #define USE_FLASHFS
147 #define USE_FLASH_M25P16