Fix KISSCC orientation // Remove unsupported softserial
[betaflight.git] / src / main / target / common.h
bloba9270aa8af4b9b4c27026967d939c2dfd1a0f787
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 // type conversion warnings.
21 // -Wconversion can be turned on to enable the process of eliminating these warnings
22 //#pragma GCC diagnostic warning "-Wconversion"
23 #pragma GCC diagnostic ignored "-Wsign-conversion"
24 // -Wpadded can be turned on to check padding of structs
25 //#pragma GCC diagnostic warning "-Wpadded"
27 //#define SCHEDULER_DEBUG // define this to use scheduler debug[] values. Undefined by default for performance reasons
28 #define DEBUG_MODE DEBUG_NONE // change this to change initial debug mode
30 #define I2C1_OVERCLOCK true
31 #define I2C2_OVERCLOCK true
33 #ifdef STM32F7
34 #define STM_FAST_TARGET
35 #define I2C3_OVERCLOCK true
36 #define I2C4_OVERCLOCK true
37 #define TELEMETRY_IBUS
38 #endif
40 /****************************
41 STM32 F4 specific settings.
42 ****************************/
43 #ifdef STM32F4
44 #define STM_FAST_TARGET
45 #define USE_DSHOT
46 #define I2C3_OVERCLOCK true
47 #define TELEMETRY_IBUS
48 #endif
50 #ifdef STM32F3
51 #define USE_DSHOT
52 #undef GPS
53 #define MINIMAL_CLI
54 #endif
56 #ifdef STM32F1
57 // Using RX DMA disables the use of receive callbacks
58 #define USE_UART1_RX_DMA
59 #define USE_UART1_TX_DMA
61 #define MINIMAL_CLI
62 #endif
64 #define SERIAL_RX
65 #define USE_SERIALRX_CRSF // Team Black Sheep Crossfire protocol
66 #define USE_SERIALRX_SPEKTRUM // SRXL, DSM2 and DSMX protocol
67 #define USE_SERIALRX_SBUS // Frsky and Futaba receivers
68 #define USE_SERIALRX_IBUS // FlySky and Turnigy receivers
69 #define USE_SERIALRX_SUMD // Graupner Hott protocol
70 #define USE_SERIALRX_SUMH // Graupner legacy protocol
71 #define USE_SERIALRX_XBUS // JR
72 #define USE_CLI
73 #define USE_PWM
74 #define USE_PPM
76 #if defined(STM_FAST_TARGET)
77 #define MAX_AUX_CHANNELS 99
78 #define TASK_GYROPID_DESIRED_PERIOD 125
79 #define SCHEDULER_DELAY_LIMIT 10
80 #else
81 #define MAX_AUX_CHANNELS 6
82 #define TASK_GYROPID_DESIRED_PERIOD 1000
83 #define SCHEDULER_DELAY_LIMIT 100
84 #endif
86 #if (FLASH_SIZE > 64)
87 #define BLACKBOX
88 #define GPS
89 #define TELEMETRY
90 #define TELEMETRY_FRSKY
91 #define TELEMETRY_HOTT
92 #define TELEMETRY_LTM
93 #define TELEMETRY_SMARTPORT
94 #define USE_SERVOS
95 #define USE_RESOURCE_MGMT
96 #endif
98 #if (FLASH_SIZE > 128)
99 #define CMS
100 #define USE_DASHBOARD
101 #define USE_MSP_DISPLAYPORT
102 #define TELEMETRY_CRSF
103 #define TELEMETRY_SRXL
104 #define TELEMETRY_JETIEXBUS
105 #define TELEMETRY_MAVLINK
106 #define USE_RX_MSP
107 #define USE_SERIALRX_JETIEXBUS
108 #define VTX_COMMON
109 #define VTX_CONTROL
110 #define VTX_SMARTAUDIO
111 #define VTX_TRAMP
112 #define USE_SENSOR_NAMES
113 #endif