add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / LUX_RACE / target.h
blob45acda286ac893a629d3e36ee92b8d00d655b44b
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 "LUX"
22 #define LED0 PC15
23 #define LED1 PC14
24 #define LED2 PC13
26 #define BEEPER PB13
27 #define BEEPER_INVERTED
29 // MPU6500 interrupt
30 #define USE_EXTI
31 #define GYRO_INT_EXTI PA5
32 #define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready
33 //#define DEBUG_MPU_DATA_READY_INTERRUPT
34 #define USE_MPU_DATA_READY_SIGNAL
35 #define ENSURE_MPU_DATA_READY_IS_LOW
37 #define USE_SPI
38 #define USE_SPI_DEVICE_1
40 #define SPI1_SCK_PIN PB3
41 #define SPI1_MISO_PIN PB4
42 #define SPI1_MOSI_PIN PB5
43 #define SPI1_NSS_PIN PA4
45 #define USE_IMU_MPU6500
46 #define IMU_MPU6500_ALIGN CW270_DEG
47 #define MPU6500_CS_PIN SPI1_NSS_PIN
48 #define MPU6500_SPI_BUS BUS_SPI1
50 #define USE_IMU_MPU9250
51 #define IMU_MPU9250_ALIGN CW270_DEG
52 #define MPU9250_CS_PIN SPI1_NSS_PIN
53 #define MPU9250_SPI_BUS BUS_SPI1
56 #define USE_VCP
57 #define USE_UART1
58 #define USE_UART2
59 #define USE_UART3
60 #define SERIAL_PORT_COUNT 4
62 #define UART1_TX_PIN PC4
63 #define UART1_RX_PIN PC5
65 #define UART2_TX_PIN PA14
66 #define UART2_RX_PIN PA15
68 #define UART3_TX_PIN PB10
69 #define UART3_RX_PIN PB11
71 #define USE_I2C
72 #define USE_I2C_DEVICE_2
74 #define USE_ADC
75 #define ADC_INSTANCE ADC1
76 #define ADC_CHANNEL_1_PIN PC0
77 #define ADC_CHANNEL_2_PIN PC1
78 #define ADC_CHANNEL_3_PIN PC2
79 #define ADC_CHANNEL_4_PIN PC3
80 #define VBAT_ADC_CHANNEL ADC_CHN_1
81 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
82 #define RSSI_ADC_CHANNEL ADC_CHN_3
84 #define USE_LED_STRIP
85 #define WS2811_PIN PA6 // TIM16_CH1
86 #define WS2811_DMA_STREAM DMA1_Channel3
87 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3
88 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER
91 #define USE_SPEKTRUM_BIND
92 // USART1, PC5
93 #define BIND_PIN PC5
95 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
97 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
98 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_VBAT)
100 // Number of available PWM outputs
101 #define MAX_PWM_OUTPUT_PORTS 10
103 // IO - assuming 303 in 64pin package, TODO
104 #define TARGET_IO_PORTA 0xffff
105 #define TARGET_IO_PORTB 0xffff
106 #define TARGET_IO_PORTC 0xffff
107 #define TARGET_IO_PORTD (BIT(2))
108 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
110 #define PCA9685_I2C_BUS BUS_I2C2