add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / AIKONF4 / target.h
blob28ee33cf2284b119248565344a177f3b79256cf6
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_EXTI
31 #define GYRO_INT_EXTI PC4
32 #define USE_MPU_DATA_READY_SIGNAL
34 #define USE_IMU_MPU6000
35 #define IMU_MPU6000_ALIGN CW0_DEG
36 #define MPU6000_CS_PIN SPI1_NSS_PIN
37 #define MPU6000_SPI_BUS BUS_SPI1
39 #define USE_IMU_MPU6500
40 #define IMU_MPU6500_ALIGN CW0_DEG
41 #define MPU6500_CS_PIN SPI1_NSS_PIN
42 #define MPU6500_SPI_BUS BUS_SPI1
44 #define SERIAL_PORT_COUNT 7 //VCP, UART1, UART2, UART3, UART4, SOFTSERIAL1, SOFTSERIAL2
46 #define USE_UART_INVERTER
48 #define USE_VCP
49 #define VBUS_SENSING_PIN PD2
50 #define VBUS_SENSING_ENABLED
52 #define USE_UART1
53 #define UART1_RX_PIN PA10
54 #define UART1_TX_PIN PA9
55 #define INVERTER_PIN_UART1_RX PC0 // PC0 used as inverter select GPIO
57 #define USE_UART2
58 #define UART2_TX_PIN PA2
59 #define UART2_RX_PIN PA3
61 #define USE_UART3
62 #define UART3_RX_PIN PB11
63 #define UART3_TX_PIN PB10
65 #define USE_UART4
66 #define UART4_TX_PIN PA0
67 #define UART4_RX_PIN NONE
69 #define USE_SOFTSERIAL1
70 #define SOFTSERIAL_1_TX_PIN PA9
71 #define SOFTSERIAL_1_RX_PIN PA9
73 #define USE_SOFTSERIAL2
74 #define SOFTSERIAL_2_RX_PIN PA1
75 #define SOFTSERIAL_2_TX_PIN PA1
77 #define USE_I2C
78 #define USE_I2C_DEVICE_1
79 #define I2C1_SCL PB8
80 #define I2C1_SDA PB9
82 #define DEFAULT_I2C_BUS BUS_I2C1
83 #define EXTERNAL_I2C_BUS DEFAULT_I2C_BUS
85 #define USE_BARO
86 #define BARO_I2C_BUS DEFAULT_I2C_BUS
87 #define USE_BARO_BMP280
88 #define USE_BARO_MS5611
89 #define USE_BARO_BMP085
91 #define USE_MAG
92 #define MAG_I2C_BUS DEFAULT_I2C_BUS
93 #define USE_MAG_AK8963
94 #define USE_MAG_AK8975
95 #define USE_MAG_HMC5883
96 #define USE_MAG_QMC5883
97 #define USE_MAG_IST8310
98 #define USE_MAG_IST8308
99 #define USE_MAG_MAG3110
100 #define USE_MAG_LIS3MDL
102 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
103 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
104 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
105 #define PCA9685_I2C_BUS DEFAULT_I2C_BUS
106 #define BNO055_I2C_BUS DEFAULT_I2C_BUS
108 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
109 #define SERIALRX_PROVIDER SERIALRX_SBUS
110 #define SERIALRX_UART SERIAL_PORT_USART1
112 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_SOFTSERIAL)
114 #define USE_ADC
115 #define ADC_CHANNEL_1_PIN PC1
116 #define ADC_CHANNEL_2_PIN PC2
117 #define ADC_CHANNEL_3_PIN PC3
119 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
120 #define VBAT_ADC_CHANNEL ADC_CHN_2
121 #define RSSI_ADC_CHANNEL ADC_CHN_3
123 #define USE_SPI
124 #define USE_SPI_DEVICE_1
125 #define SPI1_NSS_PIN PA4
126 #define SPI1_SCK_PIN PA5
127 #define SPI1_MISO_PIN PA6
128 #define SPI1_MOSI_PIN PA7
130 #define USE_SPI_DEVICE_2
131 #define SPI2_NSS_PIN PB12
132 #define SPI2_SCK_PIN PB13
133 #define SPI2_MISO_PIN PB14
134 #define SPI2_MOSI_PIN PB15
136 #define USE_SPI_DEVICE_3
137 #define SPI3_NSS_PIN PA15
138 #define SPI3_SCK_PIN PC10
139 #define SPI3_MISO_PIN PC11
140 #define SPI3_MOSI_PIN PC12
142 #define MAX_PWM_OUTPUT_PORTS 6
144 #define TARGET_IO_PORTA 0xffff
145 #define TARGET_IO_PORTB 0xffff
146 #define TARGET_IO_PORTC 0xffff
147 #define TARGET_IO_PORTD 0xffff
149 #define USE_MAX7456
150 #define MAX7456_SPI_BUS BUS_SPI3
151 #define MAX7456_CS_PIN SPI3_NSS_PIN
153 #define USE_LED_STRIP
154 #define WS2811_PIN PB6
156 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
157 #define M25P16_CS_PIN SPI2_NSS_PIN
158 #define M25P16_SPI_BUS BUS_SPI2
159 #define USE_FLASHFS
160 #define USE_FLASH_M25P16