Create release.yml
[betaflight.git] / src / main / target / NEUTRONRCF411SX1280 / target.h
blob96bee09d9a7edfe405482f6579e4d0335c50c7d5
2 /*
3 * This file is part of Cleanflight and Betaflight.
5 * Cleanflight and Betaflight are free software. You can redistribute
6 * this software and/or modify this software under the terms of the
7 * GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option)
9 * any later version.
11 * Cleanflight and Betaflight are distributed in the hope that they
12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
22 #pragma once
24 #define TARGET_BOARD_IDENTIFIER "NERC"
25 #define USBD_PRODUCT_STRING "NEUTRONRCF411SX1280"
27 #define LED0_PIN PC14
29 #define USE_BEEPER
30 #define BEEPER_PIN PA14
31 #define BEEPER_INVERTED
33 #define USE_UART
35 #define USE_UART1
36 #define UART1_RX_PIN PA10
37 #define UART1_TX_PIN PA9
39 #define USE_UART2
40 #define UART2_RX_PIN PA3
41 #define UART2_TX_PIN PA2
43 #define USE_VCP
45 #define SERIAL_PORT_COUNT 3
47 #define USE_GYRO
48 #define USE_ACC
49 #define USE_GYRO_SPI_MPU6000
50 #define USE_ACC_SPI_MPU6000
51 #define USE_ACC_SPI_ICM20689
52 #define USE_GYRO_SPI_ICM20689
53 #define USE_ACCGYRO_BMI270
54 #define USE_EXTI
55 #define USE_GYRO_EXTI
56 #define GYRO_1_EXTI_PIN PB6
57 #define USE_MPU_DATA_READY_SIGNAL
58 #define GYRO_1_CS_PIN SPI1_NSS_PIN
59 #define GYRO_1_SPI_INSTANCE SPI1
60 #define GYRO_1_ALIGN CW90_DEG
62 #define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
64 #define USE_MAX7456
65 #define MAX7456_SPI_INSTANCE SPI2
66 #define MAX7456_SPI_CS_PIN PB12
68 #define USE_FLASHFS
69 #define USE_FLASH_TOOLS
70 #define USE_FLASH_M25P16
71 #define USE_FLASH_W25N01G // 1Gb NAND flash support
72 #define USE_FLASH_W25M // Stacked die support
73 #define USE_FLASH_W25M512 // 512Kb (256Kb x 2 stacked) NOR flash support
74 #define USE_FLASH_W25M02G // 2Gb (1Gb x 2 stacked) NAND flash support
75 #define FLASH_CS_PIN PA8
76 #define FLASH_SPI_INSTANCE SPI2
77 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
79 #define USE_RX_SPI
80 #define RX_SPI_INSTANCE SPI3
81 #define RX_SPI_LED_INVERTED
83 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
84 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_EXPRESSLRS
86 #define USE_RX_EXPRESSLRS
87 #define USE_RX_EXPRESSLRS_TELEMETRY
88 #define USE_RX_SX1280
89 #define RX_CHANNELS_AETR
90 #define RX_SPI_BIND_PIN PB2
91 #define RX_NSS_PIN PA15
92 #define RX_SPI_LED_PIN PC15
93 #define RX_SPI_EXTI_PIN PC13
94 #define RX_EXPRESSLRS_SPI_RESET_PIN PB9
95 #define RX_EXPRESSLRS_SPI_BUSY_PIN PA13
96 #define RX_EXPRESSLRS_TIMER_INSTANCE TIM5
98 #define USE_SPI
100 #define USE_SPI_DEVICE_1
101 #define SPI1_SCK_PIN PA5
102 #define SPI1_MISO_PIN PA6
103 #define SPI1_MOSI_PIN PA7
104 #define SPI1_NSS_PIN PA4
106 #define USE_SPI_DEVICE_2
107 #define SPI2_SCK_PIN PB13
108 #define SPI2_MISO_PIN PB14
109 #define SPI2_MOSI_PIN PB15
110 // #define SPI2_NSS_PIN PB12
112 #define USE_SPI_DEVICE_3
113 #define SPI3_SCK_PIN PB3
114 #define SPI3_MISO_PIN PB4
115 #define SPI3_MOSI_PIN PB5
117 #define ADC1_DMA_OPT 0
119 #define USE_ADC
120 #define USE_ADC_INTERNAL
122 #define ADC1_INSTANCE ADC1
124 #define VBAT_ADC_PIN PA1
125 #define CURRENT_METER_ADC_PIN PB0
127 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
128 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
130 #define VBAT_SCALE_DEFAULT 110
131 #define CURRENT_METER_SCALE_DEFAULT 800
133 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP)
135 #define USE_ESCSERIAL
136 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_AUTO
137 #define DSHOT_BITBANG_DEFAULT DSHOT_BITBANG_OFF
139 #define TARGET_IO_PORTA 0xffff
140 #define TARGET_IO_PORTB 0xffff
141 #define TARGET_IO_PORTC 0xffff
142 #define TARGET_IO_PORTD (BIT(2))
144 #define USABLE_TIMER_CHANNEL_COUNT 5
146 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4))