Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / common_post.h
blobd3ccf280b1774bfad891d0b2495209a0b8134751
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 // Touch up configuration
20 #pragma once
22 // Config storage in memory-mapped flash
23 extern uint8_t __config_start;
24 extern uint8_t __config_end;
26 // Backward compatibility for I2C OLED display
27 #if !defined(USE_I2C)
28 # undef USE_DASHBOARD
29 # undef USE_OLED_UG2864
30 #endif
32 // Enable MSP_DISPLAYPORT for F3 targets without builtin OSD,
33 // since it's used to display CMS on MWOSD
34 #if !defined(USE_MSP_DISPLAYPORT) && !defined(USE_OSD)
35 #define USE_MSP_DISPLAYPORT
36 #endif
38 #if defined(USE_OSD)
39 #define USE_CANVAS
40 #endif
42 // Enable MSP BARO & MAG drivers if BARO and MAG sensors are compiled in
43 #if defined(USE_MAG)
44 #define USE_MAG_MSP
46 #if defined(USE_MAG_ALL)
48 #define USE_MAG_HMC5883
49 #define USE_MAG_IST8310
50 #define USE_MAG_LIS3MDL
51 #define USE_MAG_MAG3110
52 #define USE_MAG_QMC5883
54 //#if (MCU_FLASH_SIZE > 512)
55 #define USE_MAG_AK8963
56 #define USE_MAG_AK8975
57 #define USE_MAG_IST8308
58 #define USE_MAG_MLX90393
60 #if defined(USE_IMU_MPU9250)
61 #define USE_MAG_MPU9250
62 #endif
64 #define USE_MAG_RM3100
65 #define USE_MAG_VCM5883
66 //#endif // MCU_FLASH_SIZE
68 #endif // USE_MAG_ALL
70 #endif // USE_MAG
72 #if defined(USE_BARO)
73 #define USE_BARO_MSP
75 #if defined(USE_BARO_ALL)
76 #define USE_BARO_BMP085
77 #define USE_BARO_BMP280
78 #define USE_BARO_BMP388
79 #define USE_BARO_DPS310
80 #define USE_BARO_LPS25H
81 #define USE_BARO_MS5607
82 #define USE_BARO_MS5611
83 //#define USE_BARO_SPI_BMP280
84 #define USE_BARO_SPL06
85 #endif
87 #endif
89 #ifdef USE_ESC_SENSOR
90 #define USE_RPM_FILTER
91 #endif
93 #ifndef BEEPER_PWM_FREQUENCY
94 #define BEEPER_PWM_FREQUENCY 2500
95 #endif
97 #define USE_ARM_MATH // try to use FPU functions
99 #if defined(SITL_BUILD) || defined(UNIT_TEST)
100 // This feature uses 'arm_math.h', which does not exist for x86.
101 #undef USE_DYNAMIC_FILTERS
102 #undef USE_ARM_MATH
103 #endif
105 #if defined(CONFIG_IN_RAM) || defined(CONFIG_IN_FILE) || defined(CONFIG_IN_EXTERNAL_FLASH)
106 #ifndef EEPROM_SIZE
107 #define EEPROM_SIZE 8192
108 #endif
109 extern uint8_t eepromData[EEPROM_SIZE];
110 #define __config_start (*eepromData)
111 #define __config_end (*ARRAYEND(eepromData))
112 #else
113 #ifndef CONFIG_IN_FLASH
114 #define CONFIG_IN_FLASH
115 #endif
116 extern uint8_t __config_start; // configured via linker script when building binaries.
117 extern uint8_t __config_end;
118 #endif