add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / ANYFC / target.h
blobdbc23b09d7b5e4d8b0ae038f6957077b1f7308e6
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
20 #define TARGET_BOARD_IDENTIFIER "ANYF"
22 #define USBD_PRODUCT_STRING "AnyFC"
24 #define LED0 PB7
25 #define LED1 PB6
27 #define BEEPER PB2
28 #define BEEPER_INVERTED
30 #define MPU6000_CS_PIN PA4
31 #define MPU6000_SPI_BUS BUS_SPI1
33 #define USE_IMU_MPU6000
34 #define IMU_MPU6000_ALIGN CW270_DEG
36 // MPU6000 interrupts
37 #define USE_EXTI
38 #define GYRO_INT_EXTI PC4
39 #define USE_MPU_DATA_READY_SIGNAL
40 #define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU data ready (mag disabled)
42 #define USE_MAG
43 #define MAG_I2C_BUS BUS_I2C2
44 #define USE_MAG_HMC5883
45 #define USE_MAG_MAG3110
46 #define USE_MAG_QMC5883
47 #define USE_MAG_IST8310
48 #define USE_MAG_IST8308
49 #define USE_MAG_LIS3MDL
51 #define TEMPERATURE_I2C_BUS BUS_I2C2
53 #define USE_RANGEFINDER
54 #define RANGEFINDER_I2C_BUS BUS_I2C2
55 #define BNO055_I2C_BUS BUS_I2C2
57 #define USE_BARO
58 #define BARO_I2C_BUS BUS_I2C1
59 #define USE_BARO_MS5611
61 #define PITOT_I2C_BUS BUS_I2C2
63 #define USE_VCP
64 #define VBUS_SENSING_PIN PA8
66 #define USE_UART_INVERTER
68 #define USE_UART1
69 #define UART1_RX_PIN PA10
70 #define UART1_TX_PIN PA9
71 #define INVERTER_PIN_UART1_RX PC3
73 #define USE_UART2
74 #define UART2_RX_PIN PA3
75 #define UART2_TX_PIN PA2
77 #define USE_UART3
78 #define UART3_RX_PIN PB11
79 #define UART3_TX_PIN PB10
81 #define USE_UART4
82 #define UART4_RX_PIN PC11
83 #define UART4_TX_PIN PC10
85 #define USE_UART5
86 #define UART5_RX_PIN PD2
87 #define UART5_TX_PIN PC12
89 #define USE_UART6
90 #define UART6_RX_PIN PC7
91 #define UART6_TX_PIN PC6
93 #define SERIAL_PORT_COUNT 7 //VCP, UART1, UART2, UART3, UART4, UART5, UART6
95 #define USE_SPI
96 #define USE_SPI_DEVICE_1
98 #define USE_I2C
99 #define USE_I2C_DEVICE_1
100 #define USE_I2C_DEVICE_2
101 #define I2C_DEVICE_2_SHARES_UART3
102 //#define USE_I2C_PULLUP
104 //#define HIL
106 #define USE_ADC
107 #define ADC_CHANNEL_1_PIN PC0
108 #define ADC_CHANNEL_2_PIN PC1
109 #define ADC_CHANNEL_3_PIN PC2
110 #define VBAT_ADC_CHANNEL ADC_CHN_1
111 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
112 #define RSSI_ADC_CHANNEL ADC_CHN_3
114 #define USE_LED_STRIP
115 #define WS2811_PIN PA0
117 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
119 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
121 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
123 // Number of available PWM outputs
124 #define MAX_PWM_OUTPUT_PORTS 15
126 #define TARGET_IO_PORTA 0xffff
127 #define TARGET_IO_PORTB 0xffff
128 #define TARGET_IO_PORTC 0xffff
129 #define TARGET_IO_PORTD 0xffff
131 #define PCA9685_I2C_BUS BUS_I2C2