1+ /*
2+ * This file is part of INAV Project.
3+ *
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6+ * You can obtain one at http://mozilla.org/MPL/2.0/.
7+ *
8+ * Alternatively, the contents of this file may be used under the terms
9+ * of the GNU General Public License Version 3, as described below:
10+ *
11+ * This file is free software: you may copy, redistribute and/or modify
12+ * it under the terms of the GNU General Public License as published by the
13+ * Free Software Foundation, either version 3 of the License, or (at your
14+ * option) any later version.
15+ *
16+ * This file is distributed in the hope that it will be useful, but
17+ * WITHOUT ANY WARRANTY; without even the implied warranty of
18+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19+ * Public License for more details.
20+ *
21+ * You should have received a copy of the GNU General Public License
22+ * along with this program. If not, see http://www.gnu.org/licenses/.
23+ */
24+
25+ #pragma once
26+
27+ #define TARGET_BOARD_IDENTIFIER "LAIO"
28+
29+ #define USBD_PRODUCT_STRING "TBS Lucid AIO"
30+
31+ #define LED0 PC14
32+
33+ #define BEEPER_INVERTED
34+ #define BEEPER PC13
35+
36+ #define USE_VCP
37+
38+ #define USE_UART1
39+ #define UART1_TX_PIN PB6
40+ #define UART1_RX_PIN PB7
41+
42+ // #define USE_UART2
43+ // #define UART2_TX_PIN PA2
44+ // #define UART2_RX_PIN NONE
45+
46+ #define USE_UART3
47+ #define UART3_TX_PIN PB10
48+ #define UART3_RX_PIN PB11
49+
50+ #define USE_UART4
51+ #define UART4_TX_PIN NONE
52+ #define UART4_RX_PIN PH2
53+
54+ #define USE_UART5
55+ #define UART5_TX_PIN PB9
56+ #define UART5_RX_PIN PB8
57+
58+ #define SERIAL_PORT_COUNT 5
59+
60+ #define USE_SPI
61+
62+ #define USE_SPI_DEVICE_1
63+ #define SPI1_SCK_PIN PA5
64+ #define SPI1_MISO_PIN PA6
65+ #define SPI1_MOSI_PIN PA7
66+
67+ #define USE_SPI_DEVICE_2
68+ #define SPI2_SCK_PIN PB13
69+ #define SPI2_MISO_PIN PB14
70+ #define SPI2_MOSI_PIN PB15
71+
72+ #define USE_SPI_DEVICE_3
73+ #define SPI3_SCK_PIN PB3
74+ #define SPI3_MISO_PIN PB5
75+ #define SPI3_MOSI_PIN PB4
76+
77+ #define USE_IMU_ICM42605
78+ #define IMU_ICM42605_ALIGN CW0_DEG
79+ #define ICM42605_CS_PIN PA4
80+ #define ICM42605_SPI_BUS BUS_SPI1
81+
82+ #define USE_MAX7456
83+ #define MAX7456_SPI_BUS BUS_SPI2
84+ #define MAX7456_CS_PIN PB12
85+
86+ #define USE_FLASHFS
87+ #define USE_FLASH_M25P16
88+ #define M25P16_SPI_BUS BUS_SPI3
89+ #define M25P16_CS_PIN PA15
90+
91+ #define USE_I2C
92+ #define USE_I2C_DEVICE_2
93+ #define I2C2_SCL PA0
94+ #define I2C2_SDA PA1
95+
96+ #define USE_BARO
97+ #define USE_BARO_BMP388
98+ #define BARO_I2C_BUS BUS_I2C2
99+
100+ // #define USE_LED_STRIP
101+ // #define WS2811_PIN PH3
102+
103+ #define USE_ADC
104+ #define ADC_INSTANCE ADC1
105+ #define ADC1_DMA_STREAM DMA2_CHANNEL7
106+
107+ #define ADC_CHANNEL_1_PIN PB0
108+ #define ADC_CHANNEL_2_PIN PB1
109+
110+ #define VBAT_ADC_CHANNEL ADC_CHN_1
111+ #define VBAT_SCALE_DEFAULT 31
112+
113+ #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
114+ #define CURRENT_METER_SCALE 470
115+
116+ #define TARGET_IO_PORTA 0xffff
117+ #define TARGET_IO_PORTB 0xffff
118+ #define TARGET_IO_PORTC 0xffff
119+ #define TARGET_IO_PORTD (BIT(2) | BIT(12) | BIT(13))
120+ #define TARGET_IO_PORTH (BIT(2) | BIT(3))
121+
122+ #define USE_DSHOT
123+ #define USE_ESC_SENSOR
124+ #define USE_SERIAL_4WAY_BLHELI_INTERFACE
125+ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
126+ #define MAX_PWM_OUTPUT_PORTS 6
127+
128+ #define DEFAULT_FEATURES \
129+ (FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_OSD | \
130+ FEATURE_LED_STRIP)
131+
132+ #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
133+ #define SERIALRX_PROVIDER SERIALRX_CRSF
134+ #define SERIALRX_UART SERIAL_PORT_USART5
0 commit comments