mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-26 13:25:54 +00:00
🧑💻 Includes in Conditionals (for code dimming) (#27387)
This commit is contained in:
parent
97b9fe83ee
commit
162ea81894
@ -2560,7 +2560,7 @@
|
||||
|
||||
/**
|
||||
* Minimum stepper driver pulse width (in ns)
|
||||
* If undefined, these defaults (from Conditionals_adv.h) apply:
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 100 : Minimum for TMC2xxx stepper drivers
|
||||
* 500 : Minimum for LV8729
|
||||
* 1000 : Minimum for A4988 and A5984 stepper drivers
|
||||
@ -2574,7 +2574,7 @@
|
||||
|
||||
/**
|
||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||
* If undefined, these defaults (from Conditionals_adv.h) apply:
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 5000000 : Maximum for TMC2xxx stepper drivers
|
||||
* 1000000 : Maximum for LV8729 stepper driver
|
||||
* 500000 : Maximum for A4988 stepper driver
|
||||
|
@ -22,10 +22,16 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_axes.h
|
||||
* Conditionals-1-axes.h
|
||||
* Conditionals that need to be set before Configuration_adv.h or pins.h
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "MarlinConfigPre-1-axes.h"
|
||||
//========================================================
|
||||
|
||||
/**
|
||||
* Extruders have some combination of stepper motors and hotends
|
||||
* so we separate these concepts into the defines:
|
@ -22,10 +22,16 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_LCD.h
|
||||
* Conditionals-2-LCD.h
|
||||
* Conditionals that need to be set before Configuration_adv.h or pins.h
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "Conditionals-1-axes.h"
|
||||
//========================================================
|
||||
|
||||
// Support for SD Card and other file storage
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define HAS_MEDIA 1
|
@ -22,10 +22,16 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_etc.h
|
||||
* Conditionals-3-etc.h
|
||||
* Conditionals that need to be set before Configuration_adv.h or pins.h
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "Conditionals-2-LCD.h"
|
||||
//========================================================
|
||||
|
||||
#ifndef STRING_CONFIG_H_AUTHOR
|
||||
#define STRING_CONFIG_H_AUTHOR "(anonymous)"
|
||||
#endif
|
@ -22,10 +22,16 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_adv.h
|
||||
* Conditionals-4-adv.h
|
||||
* Conditionals set before pins.h and which depend on Configuration_adv.h.
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "MarlinConfigPre-4-adv.h"
|
||||
//========================================================
|
||||
|
||||
#if ENABLED(MARLIN_SMALL_BUILD)
|
||||
#undef EEPROM_CHITCHAT
|
||||
#undef CAPABILITIES_REPORT
|
@ -22,10 +22,16 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_post.h
|
||||
* Conditionals-5-post.h
|
||||
* Internal defines that depend on Configurations and Pins but are not user-editable.
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "MarlinConfigPre-5-post.h"
|
||||
//========================================================
|
||||
|
||||
#ifdef GITHUB_ACTIONS
|
||||
// Extras for CI testing
|
||||
#endif
|
||||
@ -50,7 +56,7 @@
|
||||
// Determine which type of 'EEPROM' is in use
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// EEPROM type may be defined by compile flags, configs, HALs, or pins
|
||||
// Set additional flags to let HALs choose in their Conditionals_post.h
|
||||
// Set additional flags to let HALs choose in their Conditionals-5-post.h
|
||||
#if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION, QSPI_EEPROM)
|
||||
#define USE_EMULATED_EEPROM 1
|
||||
#elif ANY(I2C_EEPROM, SPI_EEPROM)
|
@ -22,11 +22,17 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_type.h
|
||||
* Conditionals-6-type.h
|
||||
* Internal defines that depend on Configurations and Pins but are not user-editable.
|
||||
* Define conditionals in this file if they depend on core/types.h.
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "MarlinConfigPre-6-type.h"
|
||||
//========================================================
|
||||
|
||||
#ifdef GITHUB_ACTIONS
|
||||
// Extras for CI testing
|
||||
#endif
|
@ -25,30 +25,11 @@
|
||||
// Prefix header for all Marlin sources
|
||||
//
|
||||
|
||||
#include "MarlinConfigPre.h"
|
||||
|
||||
#ifdef __MARLIN_DEPS__
|
||||
#include "../HAL/shared/fauxpins.h"
|
||||
#else
|
||||
#include "../HAL/HAL.h"
|
||||
#endif
|
||||
|
||||
#include "../pins/pins.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., timers.h)
|
||||
#include HAL_PATH(.., spi_pins.h)
|
||||
#endif
|
||||
|
||||
#include "Conditionals_post.h"
|
||||
#include "MarlinConfigPre-6-type.h" // Include even with __MARLIN_DEPS__
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
|
||||
#include HAL_PATH(.., inc/Conditionals_post.h)
|
||||
|
||||
#include "../core/types.h" // Ahead of sanity-checks
|
||||
|
||||
#include "Conditionals_type.h"
|
||||
#include "Conditionals-6-type.h"
|
||||
#include HAL_PATH(.., inc/Conditionals_type.h)
|
||||
|
||||
#include "Changes.h"
|
||||
|
53
Marlin/src/inc/MarlinConfigPre-1-axes.h
Normal file
53
Marlin/src/inc/MarlinConfigPre-1-axes.h
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#define __MARLIN_FIRMWARE__
|
||||
#endif
|
||||
|
||||
#if __has_include("../../Config.h")
|
||||
#include "../../Config.h"
|
||||
#else
|
||||
#define USE_STD_CONFIGS 1
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include "../HAL/platforms.h"
|
||||
#endif
|
||||
|
||||
#include "../core/macros.h"
|
||||
#include "../core/boards.h"
|
||||
|
||||
#if USE_STD_CONFIGS
|
||||
#include "../../Configuration.h"
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOM_VERSION_FILE
|
||||
#if __has_include(STRINGIFY(../../CUSTOM_VERSION_FILE))
|
||||
#include STRINGIFY(../../CUSTOM_VERSION_FILE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Version.h"
|
34
Marlin/src/inc/MarlinConfigPre-4-adv.h
Normal file
34
Marlin/src/inc/MarlinConfigPre-4-adv.h
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "Conditionals-3-etc.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., inc/Conditionals_LCD.h)
|
||||
#endif
|
||||
|
||||
#include "../core/drivers.h"
|
||||
|
||||
#if USE_STD_CONFIGS
|
||||
#include "../../Configuration_adv.h"
|
||||
#endif
|
37
Marlin/src/inc/MarlinConfigPre-5-post.h
Normal file
37
Marlin/src/inc/MarlinConfigPre-5-post.h
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "MarlinConfigPre.h"
|
||||
|
||||
#ifdef __MARLIN_DEPS__
|
||||
#include "../HAL/shared/fauxpins.h"
|
||||
#else
|
||||
#include "../HAL/HAL.h"
|
||||
#endif
|
||||
|
||||
#include "../pins/pins.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., timers.h)
|
||||
#include HAL_PATH(.., spi_pins.h)
|
||||
#endif
|
30
Marlin/src/inc/MarlinConfigPre-6-type.h
Normal file
30
Marlin/src/inc/MarlinConfigPre-6-type.h
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "MarlinConfigPre-5-post.h"
|
||||
#include "Conditionals-5-post.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., inc/Conditionals_post.h)
|
||||
#include "../core/types.h" // Ahead of sanity-checks
|
||||
#endif
|
@ -21,55 +21,13 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#define __MARLIN_FIRMWARE__
|
||||
#endif
|
||||
|
||||
#if __has_include("../../Config.h")
|
||||
#include "../../Config.h"
|
||||
#else
|
||||
#define USE_STD_CONFIGS 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Prefix header to acquire configurations
|
||||
//
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include "../HAL/platforms.h"
|
||||
#endif
|
||||
|
||||
#include "../core/macros.h"
|
||||
#include "../core/boards.h"
|
||||
|
||||
#if USE_STD_CONFIGS
|
||||
#include "../../Configuration.h"
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOM_VERSION_FILE
|
||||
#if __has_include(STRINGIFY(../../CUSTOM_VERSION_FILE))
|
||||
#include STRINGIFY(../../CUSTOM_VERSION_FILE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Version.h"
|
||||
|
||||
#include "Conditionals_axes.h"
|
||||
#include "Conditionals_LCD.h"
|
||||
#include "Conditionals_etc.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., inc/Conditionals_LCD.h)
|
||||
#endif
|
||||
|
||||
#include "../core/drivers.h"
|
||||
|
||||
#if USE_STD_CONFIGS
|
||||
#include "../../Configuration_adv.h"
|
||||
#endif
|
||||
|
||||
#include "Conditionals_adv.h"
|
||||
#include "Conditionals-1-axes.h"
|
||||
#include "Conditionals-2-LCD.h"
|
||||
#include "Conditionals-3-etc.h"
|
||||
#include "Conditionals-4-adv.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include HAL_PATH(.., inc/Conditionals_adv.h)
|
||||
|
@ -27,6 +27,12 @@
|
||||
* Test configuration values for errors at compile-time.
|
||||
*/
|
||||
|
||||
//========================================================
|
||||
// Get requirements for the benefit of IntelliSense, etc.
|
||||
//
|
||||
#include "MarlinConfig.h"
|
||||
//========================================================
|
||||
|
||||
/**
|
||||
* Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features.
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@
|
||||
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-TinyBee"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
||||
// MAX_EXPANDER_BITS is defined for MKS TinyBee in HAL/ESP32/inc/Conditionals_adv.h
|
||||
// MAX_EXPANDER_BITS is defined for MKS TinyBee in HAL/ESP32/inc/Conditionals-4-adv.h
|
||||
|
||||
//
|
||||
// Servos
|
||||
|
@ -149,8 +149,8 @@
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#define DOGLCD_A0 26
|
||||
#define DOGLCD_CS 24
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
|
||||
//#define DOGLCD_SCK -1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -146,8 +146,8 @@
|
||||
#define TFT_BACKLIGHT_PIN PD12
|
||||
#define TFT_BACKLIGHT_PWM 150 // Brightness with alt. TIM4 chan 1 (1-255)
|
||||
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
|
||||
//#define DOGLCD_SCK -1
|
||||
|
||||
// Buffer for Color UI
|
||||
#define TFT_BUFFER_WORDS 3200
|
||||
|
@ -187,8 +187,8 @@
|
||||
* to let the bootloader init the screen.
|
||||
*/
|
||||
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
|
||||
//#define DOGLCD_SCK -1
|
||||
|
||||
//
|
||||
// TFT with FSMC interface
|
||||
|
@ -192,8 +192,8 @@
|
||||
#define TFT_RESET_PIN PC6 // FSMC_RST
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
|
||||
//#define DOGLCD_SCK -1
|
||||
|
||||
#define TOUCH_CS_PIN PA7 // SPI2_NSS
|
||||
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
|
||||
|
@ -195,7 +195,7 @@ def apply_sections(cp, ckey='all'):
|
||||
apply_ini_by_name(cp, 'config:basic')
|
||||
|
||||
# Apply historically Configuration_adv.h settings everywhere
|
||||
# (Some of which rely on defines in 'Conditionals_LCD.h')
|
||||
# (Some of which rely on defines in 'Conditionals-2-LCD.h')
|
||||
elif ckey in ('adv', 'advanced'):
|
||||
apply_ini_by_name(cp, 'config:advanced')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user