Global defines, macros, struct definitions (statuses, config2, config4, config*), extern-definitions (for globally accessible vars).
Note on configuration struct layouts
Once the struct members have been assigned to certain "role" (in certain SW version), they should not be "moved around" as the structs are stored onto EEPROM as-is and the offset and size of member needs to remain constant. Also removing existing struct members would disturb layouts. Because of this a certain amount unused old members will be left into the structs. For the storage related reasons also the bit fields are defined in byte-size (or multiple of ...) chunks.
Config Structs and 2D, 3D Tables
The config* structures contain information coming from tuning SW (e.g. TS) for 2D and 3D tables, where looked up value is not a result of direct array lookup, but from interpolation algorithm. Because of standard, reusable interpolation routines associated with structs table2D and table3D, the values from config are copied from config* structs to table2D (table3D destined configurations are not stored in config* structures).
Board choice
There's a C-preprocessor based "#if defined" logic present in this header file based on the Arduino IDE compiler set CPU (+board?) type, e.g. __AVR_ATmega2560__. This respectively drives (withi it's "#if defined ..." block):
- The setting of various BOARD_* C-preprocessor variables (e.g. BOARD_MAX_ADC_PINS)
- Setting of BOARD_H (Board header) file (e.g. "board_avr2560.h"), which is later used to include the header file
- Seems Arduino ide implicitly compiles and links respective .ino file (by it's internal build/compilation rules) (?)
- Setting of CPU (?) CORE_* variables (e.g. CORE_AVR), that is used across codebase to distinguish CPU.