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 // Touch up configuration
22 // Backward compatibility for I2C OLED display
25 # undef USE_OLED_UG2864
28 // Enable MSP_DISPLAYPORT for F3 targets without builtin OSD,
29 // since it's used to display CMS on MWOSD
30 #if !defined(USE_MSP_DISPLAYPORT) && (FLASH_SIZE > 128) && !defined(USE_OSD)
31 #define USE_MSP_DISPLAYPORT
34 #if defined(USE_OSD) && (FLASH_SIZE > 256)
39 #define USE_RPM_FILTER
43 #define FAST_CODE __attribute__((section(".tcm_code")))
44 #define NOINLINE __NOINLINE
51 #undef USE_WIND_ESTIMATOR
52 #undef USE_SERIALRX_SUMD
53 #undef USE_SERIALRX_SUMH
54 #undef USE_SERIALRX_XBUS
55 #undef USE_SERIALRX_JETIEXBUS
56 #undef USE_PWM_SERVO_DRIVER
59 #if defined(SIMULATOR_BUILD) || defined(UNIT_TEST)
60 // This feature uses 'arm_math.h', which does not exist for x86.
61 #undef USE_DYNAMIC_FILTERS
64 //Defines for compiler optimizations
66 #define FUNCTION_COMPILE_FOR_SIZE __attribute__((optimize("-Os")))
67 #define FUNCTION_COMPILE_NORMAL __attribute__((optimize("-O2")))
68 #define FUNCTION_COMPILE_FOR_SPEED __attribute__((optimize("-Ofast")))
69 #define FILE_COMPILE_FOR_SIZE _Pragma("GCC optimize(\"Os\")")
70 #define FILE_COMPILE_NORMAL _Pragma("GCC optimize(\"O2\")")
71 #define FILE_COMPILE_FOR_SPEED _Pragma("GCC optimize(\"Ofast\")")
73 #define FUNCTION_COMPILE_FOR_SIZE
74 #define FUNCTION_COMPILE_NORMAL
75 #define FUNCTION_COMPILE_FOR_SPEED
76 #define FILE_COMPILE_FOR_SIZE
77 #define FILE_COMPILE_NORMAL
78 #define FILE_COMPILE_FOR_SPEED