Create release.yml
[betaflight.git] / src / main / target / NUCLEOF7 / target.h
blob3a6d85e5d3c8443ca18daefde5fadbbb43a57418
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
23 #define TARGET_BOARD_IDENTIFIER "NUC7"
25 #define USBD_PRODUCT_STRING "NucleoF7"
27 #define LED0_PIN PB7
28 #define LED1_PIN PB14
29 #define LED0_INVERTED
30 #define LED1_INVERTED
32 #define USE_BEEPER
33 #define BEEPER_PIN PA0
34 #define BEEPER_INVERTED
36 #undef USE_MULTI_GYRO // XXX Drop this if target has I2C configured
38 #define USE_ACC
39 #define USE_FAKE_ACC
40 #define USE_ACC_MPU6050
42 #define USE_GYRO
43 #define USE_FAKE_GYRO
44 #define USE_GYRO_MPU6050
45 #define GYRO_1_ALIGN CW270_DEG
47 // MPU6050 interrupts
48 #define USE_MPU_DATA_READY_SIGNAL
49 #define USE_EXTI
50 #define USE_GYRO_EXTI
51 #define GYRO_1_EXTI_PIN PB15
52 #define USE_EXTI
54 #define USE_MAG
55 #define USE_FAKE_MAG
56 #define USE_MAG_HMC5883
57 #define USE_MAG_QMC5883
58 #define USE_MAG_LIS3MDL
59 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
61 #define USE_BARO
62 #define USE_FAKE_BARO
63 #define USE_BARO_MS5611
64 #define USE_BARO_SPI_BMP388
65 #define BARO_SPI_INSTANCE SPI1
66 #define BARO_CS_PIN SPI1_NSS_PIN
68 #define USABLE_TIMER_CHANNEL_COUNT 11
70 #define USE_VCP
71 #define USE_USB_DETECT
72 #define USB_DETECT_PIN PA9
74 //#define USE_UART1
75 //#define UART1_RX_PIN PA10
76 //#define UART1_TX_PIN PA9
78 #define USE_UART2
79 #define UART2_RX_PIN PD6
80 #define UART2_TX_PIN PD5
82 #define USE_UART3
83 #define UART3_RX_PIN PD9
84 #define UART3_TX_PIN PD8
86 #define USE_UART4
87 #define UART4_RX_PIN PC11
88 #define UART4_TX_PIN PC10
90 #define USE_UART5
91 #define UART5_RX_PIN PD2
92 #define UART5_TX_PIN PC12
94 #define USE_UART6
95 #define UART6_RX_PIN PC7
96 #define UART6_TX_PIN PC6
98 #define USE_UART7
99 #define UART7_RX_PIN PE7
100 #define UART7_TX_PIN PE8
102 #define USE_UART8
103 #define UART8_RX_PIN PE0
104 #define UART8_TX_PIN PE1
106 #define USE_SOFTSERIAL1
107 #define USE_SOFTSERIAL2
109 #define SERIAL_PORT_COUNT 10 //VCP, USART2, USART3, UART4, UART5, USART6, USART7, USART8, SOFTSERIAL x 2
111 #define USE_ESCSERIAL
112 #define ESCSERIAL_TIMER_TX_PIN PB15 // (Hardware=0, PPM)
114 #define USE_SPI
115 #define USE_SPI_DEVICE_1
116 #define USE_SPI_DEVICE_4
118 #define SPI1_NSS_PIN PA4
119 #define SPI1_SCK_PIN PA5
120 #define SPI1_MISO_PIN PA6
121 #define SPI1_MOSI_PIN PA7
123 #define SPI4_NSS_PIN PE11
124 #define SPI4_SCK_PIN PE12
125 #define SPI4_MISO_PIN PE13
126 #define SPI4_MOSI_PIN PE14
128 #define USE_SDCARD
129 #define USE_SDCARD_SPI
130 #define SDCARD_DETECT_INVERTED
131 #define SDCARD_DETECT_PIN PF14
132 #define SDCARD_SPI_INSTANCE SPI4
133 #define SDCARD_SPI_CS_PIN SPI4_NSS_PIN
134 #define SPI4_TX_DMA_OPT 0 // DMA 2 Stream 1 Channel 4
136 #define USE_FLASHFS
137 #define USE_FLASH_CHIP
138 #define USE_FLASH_M25P16
139 #define USE_FLASH_W25N01G // 1Gb NAND flash support
140 #define USE_FLASH_W25M // Stacked die support
141 #define USE_FLASH_W25M512 // 512Kb (256Kb x 2 stacked) NOR flash support
142 #define USE_FLASH_W25M02G // 2Gb (1Gb x 2 stacked) NAND flash support
143 #define FLASH_SPI_INSTANCE SPI4
144 #define FLASH_CS_PIN PE10
146 #define USE_I2C
147 #define USE_I2C_DEVICE_1
148 #define I2C_DEVICE (I2CDEV_1)
149 #define I2C1_SCL PB8
150 #define I2C1_SDA PB9
152 #define USE_ADC
153 #define VBAT_ADC_PIN PA3
154 #define CURRENT_METER_ADC_PIN PC0
155 #define RSSI_ADC_PIN PC3
157 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
159 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
160 #define SERIALRX_PROVIDER SERIALRX_SBUS
162 #define TARGET_IO_PORTA 0xffff
163 #define TARGET_IO_PORTB 0xffff
164 #define TARGET_IO_PORTC 0xffff
165 #define TARGET_IO_PORTD 0xffff
166 #define TARGET_IO_PORTE 0xffff
167 #define TARGET_IO_PORTF 0xffff
168 #define TARGET_IO_PORTG 0xffff
170 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) | TIM_N(12) )