Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / NERO / target.h
blob790709951a7ecf60ec716a17773e39de11cda357
1 /*
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)
8 * any later version.
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/>.
21 #pragma once
22 #define TARGET_BOARD_IDENTIFIER "NERO"
24 #define USBD_PRODUCT_STRING "NERO"
26 #define HW_PIN PB2
28 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
30 #define LED0_PIN PB6
31 #define LED1_PIN PB5
32 #define LED2_PIN PB4
34 #define USE_BEEPER
35 #define BEEPER_PIN PC1
36 #define BEEPER_INVERTED
38 // MPU6500 interrupt
39 #define USE_EXTI
40 #define USE_GYRO_EXTI
41 #define GYRO_1_EXTI_PIN PB2
42 #define USE_MPU_DATA_READY_SIGNAL
44 #define GYRO_1_CS_PIN PC4
45 #define GYRO_1_SPI_INSTANCE SPI1
47 #define USE_ACC
48 #define USE_ACC_SPI_MPU6500
50 #define USE_GYRO
51 #define USE_GYRO_SPI_MPU6500
52 #define GYRO_1_ALIGN CW0_DEG
54 #define USE_SDCARD
55 #define USE_SDCARD_SPI
56 #define SDCARD_DETECT_INVERTED
57 #define SDCARD_DETECT_PIN PD2
58 #define SDCARD_SPI_INSTANCE SPI3
59 #define SDCARD_SPI_CS_PIN PA15
60 //#define SPI3_TX_DMA_OPT 0 // DMA 1 Stream 5 Channel 0
62 #define USE_I2C
63 #define USE_I2C_DEVICE_1
64 #define I2C_DEVICE (I2CDEV_1)
65 #define I2C1_SCL PB8
66 #define I2C1_SDA PB9
68 #define USE_VCP
69 //#define USB_DETECT_PIN PA8
70 //#define USE_USB_DETECT
72 #define USE_UART1
73 #define UART1_RX_PIN PA10
74 #define UART1_TX_PIN PA9
76 #define USE_UART3
77 #define UART3_RX_PIN PB11
78 #define UART3_TX_PIN PB10
80 #define USE_UART6
81 #define UART6_RX_PIN PC7
82 #define UART6_TX_PIN PC6
84 #define USE_SOFTSERIAL1
85 #define USE_SOFTSERIAL2
87 #define SERIAL_PORT_COUNT 6
89 #define USE_ESCSERIAL
90 #define ESCSERIAL_TIMER_TX_PIN PC7 // (Hardware=0, PPM)
92 #define USE_SPI
94 #define USE_SPI_DEVICE_1
95 #define SPI1_NSS_PIN PC4
96 #define SPI1_SCK_PIN PA5
97 #define SPI1_MISO_PIN PA6
98 #define SPI1_MOSI_PIN PA7
100 #define USE_SPI_DEVICE_2
101 #define SPI2_NSS_PIN PB12
102 #define SPI2_SCK_PIN PB13
103 #define SPI2_MISO_PIN PB14
104 #define SPI2_MOSI_PIN PB15
106 #define USE_SPI_DEVICE_3
107 #define SPI3_NSS_PIN PB3
108 #define SPI3_SCK_PIN PC10
109 #define SPI3_MISO_PIN PC11
110 #define SPI3_MOSI_PIN PC12
112 #define USE_ADC
113 #define VBAT_ADC_PIN PC3
115 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
117 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
118 #define SERIALRX_PROVIDER SERIALRX_SBUS
119 #define SERIALRX_UART SERIAL_PORT_USART6
121 #define TARGET_IO_PORTA 0xffff
122 #define TARGET_IO_PORTB 0xffff
123 #define TARGET_IO_PORTC 0xffff
124 #define TARGET_IO_PORTD (BIT(2))
126 #define USABLE_TIMER_CHANNEL_COUNT 9
128 #define USE_TIMER_MGMT