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)
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/>.
24 #define TARGET_BOARD_IDENTIFIER "LUXR"
26 #define TARGET_BOARD_IDENTIFIER "LUX"
29 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
40 #define BEEPER_PIN PB9
43 #define BEEPER_PIN PB13
45 #define BEEPER_INVERTED
50 #define GYRO_1_EXTI_PIN PA5
51 #define USE_MPU_DATA_READY_SIGNAL
52 #define ENSURE_MPU_DATA_READY_IS_LOW
55 #define USE_SPI_DEVICE_1
57 #define USE_SPI_DEVICE_2
60 #define SPI1_SCK_PIN PB3
61 #define SPI1_MISO_PIN PB4
62 #define SPI1_MOSI_PIN PB5
64 #define SPI1_NSS_PIN PA4
68 #define SPI2_NSS_PIN PB12
69 #define SPI2_SCK_PIN PB13
70 #define SPI2_MISO_PIN PB14
71 #define SPI2_MOSI_PIN PB15
74 #define USE_SDCARD_SPI
75 #define SDCARD_DETECT_INVERTED
76 #define SDCARD_DETECT_PIN PC13
77 #define SDCARD_SPI_INSTANCE SPI2
78 #define SDCARD_SPI_CS_PIN SPI2_NSS_PIN
80 // Note, this is the same DMA channel as UART1_RX. Luckily we don't use DMA for USART Rx.
81 #define SDCARD_SPI_DMA_OPT 0 // DMA 1 Channel 5
84 #define GYRO_1_CS_PIN SPI1_NSS_PIN
85 #define GYRO_1_SPI_INSTANCE SPI1
88 #define GYRO_1_ALIGN CW270_DEG
90 #define USE_GYRO_SPI_MPU6000
92 #define USE_GYRO_SPI_MPU6500
97 #define USE_ACC_MPU6000
98 #define USE_ACC_SPI_MPU6000
100 #define USE_ACC_MPU6500
101 #define USE_ACC_SPI_MPU6500
108 #define USE_SOFTSERIAL1
109 #define USE_SOFTSERIAL2
113 # define SERIAL_PORT_COUNT 8
115 # define SERIAL_PORT_COUNT 6
118 #define UART1_TX_PIN PC4
119 #define UART1_RX_PIN PC5
121 #define UART2_TX_PIN PA14
122 #define UART2_RX_PIN PA15
124 #define UART3_TX_PIN PB10
125 #define UART3_RX_PIN PB11
130 #define ADC_INSTANCE ADC1
131 #define VBAT_ADC_PIN PC0
132 #define CURRENT_METER_ADC_PIN PC1
133 #define RSSI_ADC_PIN PC2
134 #define EXTERNAL1_ADC_PIN PC3
136 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
137 #define SERIALRX_PROVIDER SERIALRX_SBUS
138 #define SERIALRX_UART SERIAL_PORT_USART2
139 #define SBUS_TELEMETRY_UART SERIAL_PORT_USART1
142 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
143 #define DEFAULT_FEATURES (FEATURE_TELEMETRY)
145 #define DEFAULT_FEATURES (FEATURE_TELEMETRY)
148 #define USE_ESCSERIAL
149 #define ESCSERIAL_TIMER_TX_PIN PA8 // (HARDARE=0,PPM)
151 // IO - assuming 303 in 64pin package, TODO
152 #define TARGET_IO_PORTA 0xffff
153 #define TARGET_IO_PORTB 0xffff
154 #define TARGET_IO_PORTC 0xffff
155 #define TARGET_IO_PORTD (BIT(2))
156 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
159 #define USABLE_TIMER_CHANNEL_COUNT 6
160 #define USED_TIMERS (TIM_N(1) | TIM_N(3) | TIM_N(8) | TIM_N(16))
162 #define USABLE_TIMER_CHANNEL_COUNT 12
163 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) | TIM_N(15) | TIM_N(16))