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/>.
20 #if defined(STM32F7) || defined(STM32H7)
25 #define FAST_CODE __attribute__((section(".tcm_code")))
26 #define NOINLINE __attribute__((noinline))
32 #define DYNAMIC_HEAP_SIZE 2048
34 #define I2C1_OVERCLOCK false
35 #define I2C2_OVERCLOCK false
36 #define USE_I2C_PULLUP // Enable built-in pullups on all boards in case external ones are too week
39 #define USE_SERIALRX_SPEKTRUM // Cheap and fairly common protocol
40 #define USE_SERIALRX_SBUS // Very common protocol
41 #define USE_SERIALRX_IBUS // Cheap FlySky & Turnigy receivers
42 #define USE_SERIALRX_FPORT
43 #define USE_SERIALRX_FPORT2
45 //#define USE_DEV_TOOLS // tools for dev use only. Undefine for release builds.
47 #define COMMON_DEFAULT_FEATURES (FEATURE_TX_PROF_SEL)
49 #define USE_SERVO_SBUS
51 #define USE_ADC_AVERAGING
52 #define USE_64BIT_TIME
55 #define USE_GPS_PROTO_UBLOX
56 #define USE_GPS_PROTO_MSP
58 #define USE_TELEMETRY_LTM
60 // This is the shortest period in microseconds that the scheduler will allow
61 #define SCHEDULER_DELAY_LIMIT 10
63 #if defined(MAG_I2C_BUS) || defined(VCM5883_I2C_BUS)
64 #define USE_MAG_VCM5883
67 #define USE_MR_BRAKING_MODE
71 #define USE_DYNAMIC_FILTERS
72 #define USE_GYRO_KALMAN
73 #define USE_SMITH_PREDICTOR
74 #define USE_RATE_DYNAMICS
75 #define USE_EXTENDED_CMS_MENUS
77 // Allow default rangefinders
78 #define USE_RANGEFINDER
79 #define USE_RANGEFINDER_MSP
80 #define USE_RANGEFINDER_BENEWAKE
81 #define USE_RANGEFINDER_VL53L0X
82 #define USE_RANGEFINDER_VL53L1X
83 #define USE_RANGEFINDER_US42
84 #define USE_RANGEFINDER_TOF10120_I2C
86 // Allow default optic flow boards
88 #define USE_OPFLOW_CXOF
89 #define USE_OPFLOW_MSP
91 // Allow default airspeed sensors
93 #define USE_PITOT_MS4525
95 #define USE_PITOT_DLVR
98 #define USE_1WIRE_DS2482
100 #define USE_TEMPERATURE_SENSOR
101 #define USE_TEMPERATURE_LM75
102 #define USE_TEMPERATURE_DS18B20
104 #define USE_MSP_DISPLAYPORT
105 #define USE_DASHBOARD
106 #define DASHBOARD_ARMED_BITMAP
107 #define USE_OLED_UG2864
111 #define USE_DJI_HD_OSD
113 #define USE_SMARTPORT_MASTER
115 #define NAV_NON_VOLATILE_WAYPOINT_CLI
117 #define NAV_AUTO_MAG_DECLINATION_PRECISE
120 #define USE_ANTIGRAVITY
122 #define USE_I2C_IO_EXPANDER
124 #define USE_TELEMETRY_SIM
125 #define USE_TELEMETRY_MAVLINK
126 #define USE_MSP_OVER_TELEMETRY
128 #define USE_SERIALRX_SRXL2 // Spektrum SRXL2 protocol
129 #define USE_SERIALRX_JETIEXBUS
130 #define USE_SERIALRX_MAVLINK
131 #define USE_TELEMETRY_SRXL
132 #define USE_SPEKTRUM_CMS_TELEMETRY
133 //#define USE_SPEKTRUM_VTX_CONTROL //Some functions from betaflight still not implemented
134 #define USE_SPEKTRUM_VTX_TELEMETRY
136 #define USE_VTX_COMMON
138 #define USE_SERIALRX_GHST
139 #define USE_TELEMETRY_GHST
141 #define USE_POWER_LIMITS
143 #define USE_SAFE_HOME
144 #define USE_FW_AUTOLAND
145 #define USE_AUTOTUNE_FIXED_WING
150 #define NAV_NON_VOLATILE_WAYPOINT_STORAGE
151 #define USE_TELEMETRY_IBUS
152 #define USE_TELEMETRY_SMARTPORT
153 #define USE_TELEMETRY_CRSF
154 #define USE_TELEMETRY_JETIEXBUS
155 // These are rather exotic serial protocols
157 //#define USE_MSP_RC_OVERRIDE
158 #define USE_SERIALRX_CRSF
159 #define USE_SERIAL_PASSTHROUGH
160 #define NAV_MAX_WAYPOINTS 120
162 #define USE_MULTI_MISSION
163 #define USE_MULTI_FUNCTIONS // defines functions only, warnings always defined
166 #define USE_VTX_CONTROL
167 #define USE_VTX_SMARTAUDIO
168 #define USE_VTX_TRAMP
171 #define USE_PROGRAMMING_FRAMEWORK
172 #define USE_CLI_BATCH
174 //Enable DST calculations
175 #define RTC_AUTOMATIC_DST
177 #define USE_WIND_ESTIMATOR
179 #define USE_SIMULATOR
180 #define USE_PITOT_VIRTUAL
181 #define USE_FAKE_BATT_SENSOR
183 #define USE_CMS_FONT_PREVIEW
185 //Designed to free space of F722 and F411 MCUs
186 #if (MCU_FLASH_SIZE > 512)
188 #define USE_SERIALRX_SUMD
189 #define USE_TELEMETRY_HOTT
190 #define USE_HOTT_TEXTMODE
191 #define USE_24CHANNELS
192 #define MAX_MIXER_PROFILE_COUNT 2
193 #elif !defined(STM32F7)
194 #define MAX_MIXER_PROFILE_COUNT 1