Create release.yml
[betaflight.git] / src / main / target / CHEBUZZF3 / target.h
blobb13fc1adf10b6412ecb9b6a4dc2f5765a5d04300
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 "CHF3" // Chebuzz F3
26 #ifndef STM32F3DISCOVERY
27 #define STM32F3DISCOVERY
28 #endif
30 #define LED0_PIN PE8 // Blue LEDs - PE8/PE12
31 #define LED0_INVERTED
32 #define LED1_PIN PE10 // Orange LEDs - PE10/PE14
33 #define LED1_INVERTED
35 #define USE_BEEPER
36 #define BEEPER_PIN PE9 // Red LEDs - PE9/PE13
37 #define BEEPER_INVERTED
39 #define USE_SPI
40 #define USE_SPI_DEVICE_1
41 #define USE_SPI_DEVICE_2
43 #define SPI2_NSS_PIN PB12
44 #define SPI2_SCK_PIN PB13
45 #define SPI2_MISO_PIN PB14
46 #define SPI2_MOSI_PIN PB15
48 #define USE_SDCARD
49 #define USE_SDCARD_SPI
50 #define SDCARD_DETECT_PIN PC14
51 #define SDCARD_SPI_INSTANCE SPI2
52 #define SDCARD_SPI_CS_PIN SPI2_NSS_PIN
54 // Note, this is the same DMA channel as UART1_RX. Luckily we don't use DMA for USART Rx.
55 #define SDCARD_DMA_CHANNEL_TX DMA1_Channel5
57 #define USE_GYRO
58 //#define USE_GYRO_L3GD20
59 #define USE_GYRO_MPU6050
61 //#define L3GD20_SPI SPI1
62 //#define L3GD20_CS_GPIO GPIOE
63 //#define L3GD20_CS_PIN PE3
65 //#define GYRO_L3GD20_ALIGN CW270_DEG
66 #define GYRO_1_ALIGN CW0_DEG
68 #define USE_ACC
69 #define USE_ACC_MPU6050
70 //#define USE_ACC_LSM303DLHC
71 //#define LSM303DLHC_I2C I2C1
72 //#define LSM303DLHC_I2C_SCK_PIN PB6
73 //#define LSM303DLHC_I2C_SDA_PIN PB7
74 //#define LSM303DLHC_DRDY_PIN PE2
75 //#define LSM303DLHC_I2C_INT1_PIN PE4
76 //#define LSM303DLHC_I2C_INT2_PIN PE5
79 #define USE_BARO
80 #define USE_BARO_MS5611
82 #define USE_MAG
83 #define USE_MAG_AK8975
84 #define MAG_AK8975_ALIGN CW90_DEG_FLIP
86 #define USE_VCP
87 #define USE_UART1
88 #define USE_UART2
89 #define USE_SOFTSERIAL1
90 #define USE_SOFTSERIAL2
92 #define SERIAL_PORT_COUNT 5
94 #define USE_ESCSERIAL
95 #define ESCSERIAL_TIMER_TX_PIN PA8 // (HARDARE=0)
97 #define USE_I2C
98 #define USE_I2C_DEVICE_1
99 #define I2C_DEVICE (I2CDEV_1)
101 #define USE_ADC
102 #define ADC_INSTANCE ADC1
103 #define VBAT_ADC_PIN PC0
104 #define CURRENT_METER_ADC_PIN PC1
105 #define RSSI_ADC_PIN PC2
106 #define EXTERNAL1_ADC_PIN PC3
108 // IO - assuming 303 in 64pin package, TODO
109 #define TARGET_IO_PORTA 0xffff
110 #define TARGET_IO_PORTB 0xffff
111 #define TARGET_IO_PORTC 0xffff
112 #define TARGET_IO_PORTD (BIT(2)|BIT(5)|BIT(6)|BIT(10)|BIT(12)|BIT(13)|BIT(14)|BIT(15))
113 #define TARGET_IO_PORTE 0xffff
114 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4)|BIT(9)|BIT(10))
116 #define USABLE_TIMER_CHANNEL_COUNT 18
117 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) | TIM_N(16) | TIM_N(17))