Removed excess trailing spaces before new lines on licenses.
[betaflight.git] / src / main / target / AIR32 / target.h
blob493538c3d355c7ce8b8db2388b75d9c24243332e
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 "AR32" // AiR32
25 #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
27 #define LED0_PIN PB5 // Blue LED - PB5
29 #define USE_BEEPER
30 #define BEEPER_PIN PA0
32 // MPU6050 interrupts
33 #define USE_EXTI
34 #define MPU_INT_EXTI PA15
35 #define USE_MPU_DATA_READY_SIGNAL
36 //#define ENSURE_MPU_DATA_READY_IS_LOW
38 #define USE_GYRO
39 #define USE_ACC
41 #define USE_GYRO_MPU6050
42 #define GYRO_MPU6050_ALIGN CW180_DEG
44 #define USE_ACC_MPU6050
45 #define ACC_MPU6050_ALIGN CW180_DEG
47 #define USE_GYRO_SPI_MPU6000
48 #define GYRO_MPU6000_ALIGN CW180_DEG
49 #define USE_ACC_SPI_MPU6000
50 #define ACC_MPU6000_ALIGN CW180_DEG
52 #define MPU6000_CS_PIN PB12
53 #define MPU6000_SPI_INSTANCE SPI2
55 //#define USE_BARO
56 //#define USE_BARO_MS5611
58 //#define USE_MAG
59 //#define USE_MAG_HMC5883
61 #define USE_VCP
62 #define USE_UART1
63 #define USE_UART2
64 #define USE_UART3
65 #define USE_SOFTSERIAL1
66 #define USE_SOFTSERIAL2
67 #define SERIAL_PORT_COUNT 6
69 #define USE_ESCSERIAL
70 #define ESCSERIAL_TIMER_TX_PIN PA4 // (HARDARE=0)
72 #define UART1_TX_PIN PB6
73 #define UART1_RX_PIN PB7
75 #define UART2_TX_PIN PB3
76 #define UART2_RX_PIN PB4
78 #define UART3_TX_PIN PB10 //(AF7)
79 #define UART3_RX_PIN PB11 //(AF7)
81 #define USE_I2C
82 #define USE_I2C_DEVICE_2
83 #define I2C_DEVICE (I2CDEV_2)
84 #define I2C2_SCL PA9
85 #define I2C2_SDA PA10
87 #define USE_SPI
88 #define USE_SPI_DEVICE_2
90 #define M25P16_CS_PIN PB12
91 #define M25P16_SPI_INSTANCE SPI2
93 #define USE_FLASHFS
94 #define USE_FLASH_M25P16
96 #define USE_ADC
97 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
98 #define ADC_INSTANCE ADC2
99 #define VBAT_ADC_PIN PA5
100 //#define CURRENT_METER_ADC_PIN PA5
101 #define RSSI_ADC_PIN PB2
103 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
105 // IO - stm32f303cc in 48pin package
106 #define TARGET_IO_PORTA 0xffff
107 #define TARGET_IO_PORTB 0xffff
108 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
109 // #define TARGET_IO_PORTF (BIT(0)|BIT(1))
110 // !!TODO - check the following line is correct
111 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
113 #define USABLE_TIMER_CHANNEL_COUNT 10
114 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17))