Fix WS2812 led definition
[inav.git] / src / main / target / ANYFCM7 / target.h
blobe058ed7a289c4ef0d60dd91e78eddeaa6c1276e3
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "ANYM"
22 #define USBD_PRODUCT_STRING "AnyFCM7"
24 #define LED0 PB6 //red
25 #define LED1 PB9 //blue
27 #define BEEPER PB2 // Unused pin, can be mapped to elsewhere
28 #define BEEPER_INVERTED
30 #define MPU6000_CS_PIN PA4
31 #define MPU6000_SPI_BUS BUS_SPI1
33 #define USE_IMU_MPU6000
34 #define IMU_MPU6000_ALIGN CW270_DEG
36 #define USE_MAG
37 #define MAG_I2C_BUS BUS_I2C2
38 #define USE_MAG_HMC5883
39 #define USE_MAG_QMC5883
40 #define USE_MAG_IST8310
41 #define USE_MAG_IST8308
42 #define USE_MAG_MAG3110
43 #define USE_MAG_LIS3MDL
45 #define TEMPERATURE_I2C_BUS BUS_I2C2
47 #define USE_BARO
48 #define BARO_I2C_BUS BUS_I2C2
49 #define USE_BARO_MS5611
51 #define PITOT_I2C_BUS BUS_I2C2
53 #define USE_VCP
54 #define VBUS_SENSING_PIN PA8
56 #define USE_UART1
57 #define UART1_RX_PIN PA10
58 #define UART1_TX_PIN PA9
60 //#define USE_UART2
61 #define UART2_RX_PIN PA3
62 #define UART2_TX_PIN PA2
64 //#define USE_UART3
65 #define UART3_RX_PIN PB11
66 #define UART3_TX_PIN PB10
68 #define USE_UART4
69 #define UART4_RX_PIN PC11
70 #define UART4_TX_PIN PC10
72 #define USE_UART5
73 #define UART5_RX_PIN PD2
74 #define UART5_TX_PIN PC12
76 #define USE_UART6
77 #define UART6_RX_PIN PC7
78 #define UART6_TX_PIN PC6
80 #define SERIAL_PORT_COUNT 5 //VCP, USART1, UART4, UART5, USART6
82 #define USE_SPI
83 #define USE_SPI_DEVICE_1
84 #define USE_SPI_DEVICE_2
85 #define USE_SPI_DEVICE_3
87 #define SPI1_NSS_PIN PA4
88 #define SPI1_SCK_PIN PA5
89 #define SPI1_MISO_PIN PA6
90 #define SPI1_MOSI_PIN PA7
92 #define SPI2_NSS_PIN PB12
93 #define SPI2_SCK_PIN PB13
94 #define SPI2_MISO_PIN PC2
95 #define SPI2_MOSI_PIN PC1
97 #define SPI3_NSS_PIN PD2
98 #define SPI3_SCK_PIN PC10
99 #define SPI3_MISO_PIN PC11
100 #define SPI3_MOSI_PIN PC12
102 #define M25P16_CS_PIN PB12
103 #define M25P16_SPI_BUS BUS_SPI2
104 #define USE_FLASHFS
105 #define USE_FLASH_M25P16
106 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
108 #define USE_MAX7456
109 #define MAX7456_SPI_BUS BUS_SPI3
110 #define MAX7456_CS_PIN SPI3_NSS_PIN
112 #define USE_I2C
113 #define USE_I2C_DEVICE_2
115 #define USE_ADC
116 #define ADC_CHANNEL_1_PIN PC0
117 #define VBAT_ADC_CHANNEL ADC_CHN_1
119 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
120 #define SERIALRX_PROVIDER SERIALRX_SBUS
122 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
124 // Number of available PWM outputs
125 #define MAX_PWM_OUTPUT_PORTS 15
127 #define TARGET_IO_PORTA 0xffff
128 #define TARGET_IO_PORTB 0xffff
129 #define TARGET_IO_PORTC 0xffff
130 #define TARGET_IO_PORTD 0xffff
131 #define TARGET_IO_PORTE 0xffff