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
59 #define USE_GPS_FIX_ESTIMATION
61 // This is the shortest period in microseconds that the scheduler will allow
62 #define SCHEDULER_DELAY_LIMIT 10
64 #if defined(MAG_I2C_BUS) || defined(VCM5883_I2C_BUS)
65 #define USE_MAG_VCM5883
68 #define USE_MR_BRAKING_MODE
72 #define USE_DYNAMIC_FILTERS
73 #define USE_GYRO_KALMAN
74 #define USE_SMITH_PREDICTOR
75 #define USE_RATE_DYNAMICS
76 #define USE_EXTENDED_CMS_MENUS
78 // Allow default rangefinders
79 #define USE_RANGEFINDER
80 #define USE_RANGEFINDER_MSP
81 #define USE_RANGEFINDER_BENEWAKE
82 #define USE_RANGEFINDER_VL53L0X
83 #define USE_RANGEFINDER_VL53L1X
84 #define USE_RANGEFINDER_US42
85 #define USE_RANGEFINDER_TOF10120_I2C
86 #define USE_RANGEFINDER_TERARANGER_EVO_I2C
87 #define USE_RANGEFINDER_USD1_V0
88 #define USE_RANGEFINDER_NANORADAR
90 // Allow default optic flow boards
92 #define USE_OPFLOW_CXOF
93 #define USE_OPFLOW_MSP
95 // Allow default airspeed sensors
97 #define USE_PITOT_MS4525
99 #define USE_PITOT_DLVR
102 #define USE_1WIRE_DS2482
104 #define USE_TEMPERATURE_SENSOR
105 #define USE_TEMPERATURE_LM75
106 #define USE_TEMPERATURE_DS18B20
108 #define USE_MSP_DISPLAYPORT
109 #define USE_DASHBOARD
110 #define DASHBOARD_ARMED_BITMAP
111 #define USE_OLED_UG2864
115 #define USE_DJI_HD_OSD
118 #define NAV_NON_VOLATILE_WAYPOINT_CLI
121 #define USE_ANTIGRAVITY
123 #define USE_I2C_IO_EXPANDER
125 #define USE_TELEMETRY_SIM
126 #define USE_TELEMETRY_MAVLINK
127 #define USE_MSP_OVER_TELEMETRY
129 #define USE_SERIALRX_SRXL2 // Spektrum SRXL2 protocol
130 #define USE_SERIALRX_JETIEXBUS
131 #define USE_SERIALRX_MAVLINK
132 #define USE_TELEMETRY_SRXL
133 #define USE_SPEKTRUM_CMS_TELEMETRY
134 //#define USE_SPEKTRUM_VTX_CONTROL //Some functions from betaflight still not implemented
135 #define USE_SPEKTRUM_VTX_TELEMETRY
137 #define USE_VTX_COMMON
139 #define USE_SERIALRX_GHST
140 #define USE_TELEMETRY_GHST
142 #define USE_POWER_LIMITS
144 #define USE_SAFE_HOME
145 #define USE_FW_AUTOLAND
146 #define USE_AUTOTUNE_FIXED_WING
151 #define NAV_NON_VOLATILE_WAYPOINT_STORAGE
152 #define USE_TELEMETRY_IBUS
153 #define USE_TELEMETRY_SMARTPORT
154 #define USE_TELEMETRY_CRSF
155 #define USE_TELEMETRY_JETIEXBUS
156 // These are rather exotic serial protocols
158 //#define USE_MSP_RC_OVERRIDE
159 #define USE_SERIALRX_CRSF
160 #define USE_SERIAL_PASSTHROUGH
161 #define NAV_MAX_WAYPOINTS 120
163 #define USE_MULTI_MISSION
164 #define USE_MULTI_FUNCTIONS // defines functions only, warnings always defined
167 #define USE_VTX_CONTROL
168 #define USE_VTX_SMARTAUDIO
169 #define USE_VTX_TRAMP
172 #define USE_PROGRAMMING_FRAMEWORK
173 #define USE_CLI_BATCH
175 //Enable DST calculations
176 #define RTC_AUTOMATIC_DST
178 #define USE_WIND_ESTIMATOR
180 #define USE_SIMULATOR
181 #define USE_PITOT_VIRTUAL
182 #define USE_FAKE_BATT_SENSOR
184 #define USE_CMS_FONT_PREVIEW
189 #define MAX_ADSB_VEHICLES 5
190 #define ADSB_LIMIT_CM 6400000
193 #define USE_SERIAL_GIMBAL
194 #define USE_HEADTRACKER
195 #define USE_HEADTRACKER_SERIAL
196 #define USE_HEADTRACKER_MSP
198 //Designed to free space of F722 and F411 MCUs
199 #if (MCU_FLASH_SIZE > 512)
201 #define USE_SERIALRX_SUMD
202 #define USE_TELEMETRY_HOTT
203 #define USE_HOTT_TEXTMODE
204 #define USE_24CHANNELS
205 #define MAX_MIXER_PROFILE_COUNT 2
206 #define USE_SMARTPORT_MASTER
207 #elif !defined(STM32F7)
208 #define MAX_MIXER_PROFILE_COUNT 1
211 #if (MCU_FLASH_SIZE <= 512)
212 #define SKIP_CLI_COMMAND_HELP
213 #undef USE_SERIALRX_SPEKTRUM
214 #undef USE_TELEMETRY_SRXL
218 #define USE_ADAPTIVE_FILTER