Add ESCSERIAL for missing targets
[betaflight.git] / src / main / target / IRCFUSIONF3 / target.h
blob116ae4e5de7cb9fb42637a2efbbb346ea409df35
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 "IFF3"
22 #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE
24 #define LED0 PB3
26 #define USE_EXTI
27 #define MPU_INT_EXTI PC13
28 #define USE_MPU_DATA_READY_SIGNAL
29 #define ENSURE_MPU_DATA_READY_IS_LOW
31 #define GYRO
32 #define USE_GYRO_MPU6050
33 #define GYRO_MPU6050_ALIGN CW270_DEG
35 #define ACC
36 #define USE_ACC_MPU6050
37 #define ACC_MPU6050_ALIGN CW270_DEG
39 #define BARO
40 #define USE_BARO_BMP085
42 #define USE_FLASHFS
43 #define USE_FLASH_M25P16
45 #define USE_UART1
46 #define USE_UART2
47 #define USE_UART3
48 #define SERIAL_PORT_COUNT 3
50 #define USE_ESCSERIAL
51 #define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1
53 #define UART1_TX_PIN PA9
54 #define UART1_RX_PIN PA10
56 #define UART2_TX_PIN PA14
57 #define UART2_RX_PIN PA15
59 #define UART3_TX_PIN PB10
60 #define UART3_RX_PIN PB11
62 #define USE_I2C
63 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
65 #define USE_SPI
66 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
68 #define M25P16_CS_PIN PB12
69 #define M25P16_SPI_INSTANCE SPI2
71 #define BOARD_HAS_VOLTAGE_DIVIDER
72 #define USE_ADC
73 #define ADC_INSTANCE ADC2
74 #define VBAT_ADC_PIN PA4
75 #define CURRENT_METER_ADC_PIN PA5
76 #define RSSI_ADC_PIN PB2
78 #define SPEKTRUM_BIND
79 // USART3,
80 #define BIND_PIN PB11
82 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
84 #define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
85 #define USE_SERIAL_4WAY_SK_BOOTLOADER
87 #if !(defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER) || defined(USE_SERIAL_4WAY_SK_BOOTLOADER))
88 #ifdef USE_VCP
89 #define USE_SERIAL_1WIRE_VCP
90 #else
91 #define USE_SERIAL_1WIRE
92 #endif
93 #endif
95 #ifdef USE_SERIAL_1WIRE
96 #define S1W_TX_GPIO GPIOA
97 #define S1W_TX_PIN GPIO_Pin_9
98 #define S1W_RX_GPIO GPIOA
99 #define S1W_RX_PIN GPIO_Pin_10
100 #endif
103 // IO - stm32f303cc in 48pin package
104 #define TARGET_IO_PORTA 0xffff
105 #define TARGET_IO_PORTB 0xffff
106 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
107 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
109 #define USABLE_TIMER_CHANNEL_COUNT 17
110 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))