Merge pull request #2022 from wind0r/reenbable_gps
[betaflight.git] / src / main / target / common.h
blobbad1f1aa8604462ed99b8caa8ba97a2362b6c8d4
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 #endif
39 /****************************
40 STM32 F4 specific settings.
41 ****************************/
42 #ifdef STM32F4
43 #define STM_FAST_TARGET
44 #define USE_DSHOT
45 #define I2C3_OVERCLOCK true
46 #endif
48 #ifdef STM32F3
49 #define USE_DSHOT
50 #endif
52 #ifdef STM32F1
53 // Using RX DMA disables the use of receive callbacks
54 #define USE_UART1_RX_DMA
55 #define USE_UART1_TX_DMA
57 #define CLI_MINIMAL_VERBOSITY
58 #endif
60 #define SERIAL_RX
61 #define USE_SERIALRX_CRSF // Team Black Sheep Crossfire protocol
62 #define USE_SERIALRX_SPEKTRUM // DSM2 and DSMX protocol
63 #define USE_SERIALRX_SBUS // Frsky and Futaba receivers
64 #define USE_SERIALRX_IBUS // FlySky and Turnigy receivers
65 #define USE_SERIALRX_SUMD // Graupner Hott protocol
66 #define USE_SERIALRX_SUMH // Graupner legacy protocol
67 #define USE_SERIALRX_XBUS // JR
68 #define USE_CLI
69 #define USE_PWM
70 #define USE_PPM
72 #if defined(STM_FAST_TARGET)
73 #define MAX_AUX_CHANNELS 99
74 #define TASK_GYROPID_DESIRED_PERIOD 125
75 #define SCHEDULER_DELAY_LIMIT 10
76 #else
77 #define MAX_AUX_CHANNELS 6
78 #define TASK_GYROPID_DESIRED_PERIOD 1000
79 #define SCHEDULER_DELAY_LIMIT 100
80 #endif
82 #if (FLASH_SIZE > 64)
83 #define BLACKBOX
84 #define GPS
85 #define TELEMETRY
86 #define TELEMETRY_FRSKY
87 #define TELEMETRY_HOTT
88 #define TELEMETRY_IBUS
89 #define TELEMETRY_LTM
90 #define TELEMETRY_SMARTPORT
91 #define USE_SERVOS
92 #endif
94 #if (FLASH_SIZE > 128)
95 #define CMS
96 #define USE_DASHBOARD
97 #define USE_MSP_DISPLAYPORT
98 #define TELEMETRY_CRSF
99 #define TELEMETRY_SRXL
100 #define TELEMETRY_JETIEXBUS
101 #define TELEMETRY_MAVLINK
102 #define TELEMETRY_IBUS
103 #define USE_RX_MSP
104 #define USE_SERIALRX_JETIEXBUS
105 #define VTX_CONTROL
106 #define VTX_SMARTAUDIO
107 #else
108 #define SKIP_CLI_COMMAND_HELP
109 #endif