NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
target.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Ninjaflight 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.
8  *
9  * Ninjaflight 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.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #define USE_QUAD_MIXER_ONLY 0
21 #define TARGET_BOARD_IDENTIFIER "IFF3"
22 
23 #define USE_TILT 0
24 #define LED0
25 #define LED0_GPIO GPIOB
26 #define LED0_PIN Pin_3
27 #define LED0_PERIPHERAL RCC_AHBPeriph_GPIOB
28 
29 #define USABLE_TIMER_CHANNEL_COUNT 17
30 
31 #define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready, no MAG
32 
33 #define USE_MPU_DATA_READY_SIGNAL
34 #define ENSURE_MPU_DATA_READY_IS_LOW
35 
36 #define GYRO
37 #define USE_GYRO_MPU6050
38 #define GYRO_MPU6050_ALIGN CW270_DEG
39 
40 #define ACC
41 #define USE_ACC_MPU6050
42 #define ACC_MPU6050_ALIGN CW270_DEG
43 
44 #define USE_MAG 0
45 
46 #define BARO
47 #define USE_BARO_BMP085
48 
49 #define USE_FLASHFS
50 #define USE_FLASH_M25P16
51 
52 #define USE_UART1
53 #define USE_UART2
54 #define USE_UART3
55 #define SERIAL_PORT_COUNT 3
56 
57 #ifndef UART1_GPIO
58 #define UART1_TX_PIN GPIO_Pin_9 // PA9
59 #define UART1_RX_PIN GPIO_Pin_10 // PA10
60 #define UART1_GPIO GPIOA
61 #define UART1_GPIO_AF GPIO_AF_7
62 #define UART1_TX_PINSOURCE GPIO_PinSource9
63 #define UART1_RX_PINSOURCE GPIO_PinSource10
64 #endif
65 
66 #define UART2_TX_PIN GPIO_Pin_14 // PA14 / SWCLK
67 #define UART2_RX_PIN GPIO_Pin_15 // PA15
68 #define UART2_GPIO GPIOA
69 #define UART2_GPIO_AF GPIO_AF_7
70 #define UART2_TX_PINSOURCE GPIO_PinSource14
71 #define UART2_RX_PINSOURCE GPIO_PinSource15
72 
73 #ifndef UART3_GPIO
74 #define UART3_TX_PIN GPIO_Pin_10 // PB10 (AF7)
75 #define UART3_RX_PIN GPIO_Pin_11 // PB11 (AF7)
76 #define UART3_GPIO_AF GPIO_AF_7
77 #define UART3_GPIO GPIOB
78 #define UART3_TX_PINSOURCE GPIO_PinSource10
79 #define UART3_RX_PINSOURCE GPIO_PinSource11
80 #endif
81 
82 #define USE_I2C
83 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
84 
85 #define USE_SPI
86 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
87 
88 #define M25P16_CS_GPIO GPIOB
89 #define M25P16_CS_PIN GPIO_Pin_12
90 #define M25P16_SPI_INSTANCE SPI2
91 
92 #define USE_ADC
93 #define BOARD_HAS_VOLTAGE_DIVIDER
94 
95 
96 #define ADC_INSTANCE ADC2
97 #define ADC_DMA_CHANNEL DMA2_Channel1
98 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA2
99 
100 #define VBAT_ADC_GPIO GPIOA
101 #define VBAT_ADC_GPIO_PIN GPIO_Pin_4
102 #define VBAT_ADC_CHANNEL ADC_Channel_1
103 
104 #define CURRENT_METER_ADC_GPIO GPIOA
105 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_5
106 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_2
107 
108 #define RSSI_ADC_GPIO GPIOB
109 #define RSSI_ADC_GPIO_PIN GPIO_Pin_2
110 #define RSSI_ADC_CHANNEL ADC_Channel_12
111 
112 #define BLACKBOX
113 #define GPS
114 #define GTUNE
115 #define SERIAL_RX
116 #define USE_SERVOS
117 #define TELEMETRY
118 #define USE_CLI
119 
120 #define SPEKTRUM_BIND
121 // USART3,
122 #define BIND_PORT GPIOB
123 #define BIND_PIN Pin_11
124 
125 #define USE_SERIAL_4WAY_BLHELI_INTERFACE