[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / target / common.h
bloba6ff91b0384315ac9a9ed1ec9139ee51276a8445
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 #if defined(STM32F3)
21 #define DYNAMIC_HEAP_SIZE 1024
22 #else
23 #define DYNAMIC_HEAP_SIZE 2048
24 #endif
26 #define I2C1_OVERCLOCK false
27 #define I2C2_OVERCLOCK false
28 #define USE_I2C_PULLUP // Enable built-in pullups on all boards in case external ones are too week
30 #define USE_RX_PPM
31 #define USE_SERIAL_RX
32 #define USE_SERIALRX_SPEKTRUM // Cheap and fairly common protocol
33 #define USE_SERIALRX_SBUS // Very common protocol
34 #define USE_SERIALRX_IBUS // Cheap FlySky & Turnigy receivers
35 #define USE_SERIALRX_FPORT
37 #define COMMON_DEFAULT_FEATURES (FEATURE_TX_PROF_SEL)
39 #if defined(STM32F3)
40 #define USE_UNDERCLOCK
41 //save flash for F3 targets
42 #define CLI_MINIMAL_VERBOSITY
43 #define SKIP_CLI_COMMAND_HELP
44 #define SKIP_CLI_RESOURCES
45 #endif
47 #if defined(STM32F4) || defined(STM32F7)
48 #define USE_USB_MSC
49 #define USE_SERVO_SBUS
50 #endif
52 #define USE_ADC_AVERAGING
53 #define USE_64BIT_TIME
54 #define USE_BLACKBOX
55 #define USE_GPS
56 #define USE_GPS_PROTO_UBLOX
57 #define USE_NAV
58 #define USE_TELEMETRY
59 #define USE_TELEMETRY_LTM
60 #define USE_TELEMETRY_FRSKY
62 #if defined(STM_FAST_TARGET)
63 #define SCHEDULER_DELAY_LIMIT 10
64 #else
65 #define SCHEDULER_DELAY_LIMIT 100
66 #endif
68 #if (FLASH_SIZE > 256)
69 #define USE_MR_BRAKING_MODE
70 #define USE_PITOT
71 #define USE_PITOT_ADC
72 #define USE_PITOT_VIRTUAL
74 #define USE_DYNAMIC_FILTERS
75 #define USE_GYRO_KALMAN
76 #define USE_EXTENDED_CMS_MENUS
77 #define USE_UAV_INTERCONNECT
78 #define USE_RX_UIB
79 #define USE_HOTT_TEXTMODE
81 // NAZA GPS support for F4+ only
82 #define USE_GPS_PROTO_NAZA
84 // Allow default rangefinders
85 #define USE_RANGEFINDER
86 #define USE_RANGEFINDER_MSP
87 #define USE_RANGEFINDER_BENEWAKE
88 #define USE_RANGEFINDER_VL53L0X
89 #define USE_RANGEFINDER_HCSR04_I2C
91 // Allow default optic flow boards
92 #define USE_OPFLOW
93 #define USE_OPFLOW_CXOF
94 #define USE_OPFLOW_MSP
96 #define USE_PITOT
97 #define USE_PITOT_MS4525
99 #define USE_1WIRE
100 #define USE_1WIRE_DS2482
102 #define USE_TEMPERATURE_SENSOR
103 #define USE_TEMPERATURE_LM75
104 #define USE_TEMPERATURE_DS18B20
106 #define USE_MSP_DISPLAYPORT
107 #define USE_DASHBOARD
108 #define DASHBOARD_ARMED_BITMAP
109 #define USE_OLED_UG2864
111 #define USE_PWM_DRIVER_PCA9685
113 #define USE_TELEMETRY_SIM
114 #define USE_FRSKYOSD
115 #define USE_DJI_HD_OSD
117 #define NAV_NON_VOLATILE_WAYPOINT_CLI
119 #define NAV_AUTO_MAG_DECLINATION_PRECISE
121 #define USE_D_BOOST
122 #define USE_ANTIGRAVITY
124 #else // FLASH_SIZE < 256
125 #define LOG_LEVEL_MAXIMUM LOG_LEVEL_ERROR
126 #endif
128 #if (FLASH_SIZE > 128)
129 #define NAV_FIXED_WING_LANDING
130 #define USE_AUTOTUNE_FIXED_WING
131 #define USE_LOG
132 #define USE_STATS
133 #define USE_CMS
134 #define CMS_MENU_OSD
135 #define USE_GPS_PROTO_NMEA
136 #define USE_GPS_PROTO_MTK
137 #define NAV_GPS_GLITCH_DETECTION
138 #define NAV_NON_VOLATILE_WAYPOINT_STORAGE
139 #define USE_TELEMETRY_HOTT
140 #define USE_TELEMETRY_IBUS
141 #define USE_TELEMETRY_MAVLINK
142 #define USE_TELEMETRY_SMARTPORT
143 #define USE_TELEMETRY_CRSF
144 #define USE_MSP_OVER_TELEMETRY
145 // These are rather exotic serial protocols
146 #define USE_RX_MSP
147 //#define USE_MSP_RC_OVERRIDE
148 #define USE_SERIALRX_SUMD
149 #define USE_SERIALRX_SUMH
150 #define USE_SERIALRX_XBUS
151 #define USE_SERIALRX_JETIEXBUS
152 #define USE_SERIALRX_CRSF
153 #define USE_PWM_SERVO_DRIVER
154 #define USE_SERIAL_PASSTHROUGH
155 #define NAV_MAX_WAYPOINTS 60
156 #define USE_RCDEVICE
158 //Enable VTX control
159 #define USE_VTX_CONTROL
160 #define USE_VTX_SMARTAUDIO
161 #define USE_VTX_TRAMP
162 #define USE_VTX_FFPV
164 #ifndef STM32F3 //F3 series does not have enoug RAM to support logic conditions
165 #define USE_PROGRAMMING_FRAMEWORK
166 #define USE_CLI_BATCH
167 #endif
169 //Enable DST calculations
170 #define RTC_AUTOMATIC_DST
171 // Wind estimator
172 #define USE_WIND_ESTIMATOR
174 #else // FLASH_SIZE < 128
176 #define SKIP_TASK_STATISTICS
178 #endif
180 #ifdef STM32F7
181 #define USE_ITCM_RAM
182 #endif