Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / ANYFCM7 / target.h
blobcbb7828e61f6509562f4e6621fce0853c6d4adc8
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 "ANYM"
25 #define USBD_PRODUCT_STRING "AnyFCM7"
27 #define LED0_PIN PB6 //red
28 #define LED1_PIN PB9 //blue
30 #define USE_BEEPER
31 #define BEEPER_PIN PB2 // Unused pin, can be mapped to elsewhere
32 #define BEEPER_INVERTED
34 #define GYRO_1_CS_PIN PA4
35 #define GYRO_1_SPI_INSTANCE SPI1
37 #define USE_ACC
38 #define USE_ACC_SPI_MPU6000
40 #define USE_GYRO
41 #define USE_GYRO_SPI_MPU6000
42 #define GYRO_1_ALIGN CW270_DEG
44 // MPU6000 interrupts
45 #define USE_MPU_DATA_READY_SIGNAL
46 #define USE_EXTI
47 #define USE_GYRO_EXTI
48 #define GYRO_1_EXTI_PIN PC4
49 #define USE_EXTI
51 #define USE_MAG
52 //#define USE_MAG_HMC5883
53 //#define HMC5883_BUS I2C_DEVICE_EXT
54 //#define MAG_HMC5883_ALIGN CW270_DEG_FLIP
55 //#define MAG_HMC5883_ALIGN CW90_DEG
57 #define USE_BARO
58 #define USE_BARO_MS5611
60 #define USABLE_TIMER_CHANNEL_COUNT 16
62 #define USE_VCP
63 #define USE_USB_DETECT
64 #define USB_DETECT_PIN PA8
66 #define USE_UART1
67 #define UART1_RX_PIN PA10
68 #define UART1_TX_PIN PA9
70 //#define USE_UART2
71 #define UART2_RX_PIN PA3
72 #define UART2_TX_PIN PA2
74 //#define USE_UART3
75 #define UART3_RX_PIN PB11
76 #define UART3_TX_PIN PB10
78 #define USE_UART4
79 #define UART4_RX_PIN PC11
80 #define UART4_TX_PIN PC10
82 #define USE_UART5
83 #define UART5_RX_PIN PD2
84 #define UART5_TX_PIN PC12
86 #define USE_UART6
87 #define UART6_RX_PIN PC7
88 #define UART6_TX_PIN PC6
90 #define USE_SOFTSERIAL1
91 #define USE_SOFTSERIAL2
93 #define SERIAL_PORT_COUNT 7 //VCP, USART1, UART4, UART5, USART6, SOFTSERIAL x 2
95 #define USE_ESCSERIAL
96 #define ESCSERIAL_TIMER_TX_PIN PB14 // (Hardware=0, PPM)
98 #define USE_SPI
99 #define USE_SPI_DEVICE_1
100 #define USE_SPI_DEVICE_2
101 #define USE_SPI_DEVICE_3
103 #define SPI1_NSS_PIN PA4
104 #define SPI1_SCK_PIN PA5
105 #define SPI1_MISO_PIN PA6
106 #define SPI1_MOSI_PIN PA7
108 #define SPI2_NSS_PIN PB12
109 #define SPI2_SCK_PIN PB13
110 #define SPI2_MISO_PIN PC2
111 #define SPI2_MOSI_PIN PC1
113 #define SPI3_NSS_PIN PD2
114 #define SPI3_SCK_PIN PC10
115 #define SPI3_MISO_PIN PC11
116 #define SPI3_MOSI_PIN PC12
118 #define FLASH_CS_PIN PB12
119 #define FLASH_SPI_INSTANCE SPI2
120 #define USE_FLASHFS
121 #define USE_FLASH_M25P16
122 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
124 #define USE_MAX7456
125 #define MAX7456_SPI_INSTANCE SPI3
126 #define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
128 #define USE_I2C
129 #define USE_I2C_DEVICE_2
130 #define I2C_DEVICE (I2CDEV_2)
132 #define USE_ADC
133 #define VBAT_ADC_PIN PC0
135 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
136 #define SERIALRX_PROVIDER SERIALRX_SBUS
138 #define TARGET_IO_PORTA 0xffff
139 #define TARGET_IO_PORTB 0xffff
140 #define TARGET_IO_PORTC 0xffff
141 #define TARGET_IO_PORTD 0xffff
142 #define TARGET_IO_PORTE 0xffff
144 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(12))