From ca55f2927ab7416c6f404cfdeade4c9d5103929c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 19:26:23 -0600 Subject: [PATCH] Pulldown pin mode support (#9701) Implemented for LPC1768. --- Marlin/Configuration.h | 23 +++++++-- Marlin/src/HAL/HAL_LPC1768/arduino.cpp | 49 ++++++++++--------- Marlin/src/HAL/HAL_LPC1768/fastio.h | 5 ++ Marlin/src/HAL/HAL_LPC1768/include/Arduino.h | 9 ++-- Marlin/src/Marlin.cpp | 4 +- Marlin/src/config/default/Configuration.h | 23 +++++++-- .../AlephObjects/TAZ4/Configuration.h | 23 +++++++-- .../AliExpress/CL-260/Configuration.h | 23 +++++++-- .../config/examples/Anet/A6/Configuration.h | 23 +++++++-- .../config/examples/Anet/A8/Configuration.h | 23 +++++++-- .../examples/Azteeg/X5GT/Configuration.h | 23 +++++++-- .../BIBO/TouchX/cyclops/Configuration.h | 23 +++++++-- .../BIBO/TouchX/default/Configuration.h | 23 +++++++-- .../examples/BQ/Hephestos/Configuration.h | 23 +++++++-- .../examples/BQ/Hephestos_2/Configuration.h | 23 +++++++-- .../config/examples/BQ/WITBOX/Configuration.h | 23 +++++++-- .../config/examples/Cartesio/Configuration.h | 23 +++++++-- .../examples/Creality/CR-10/Configuration.h | 23 +++++++-- .../examples/Creality/CR-10S/Configuration.h | 23 +++++++-- .../examples/Creality/Ender/Configuration.h | 23 +++++++-- .../src/config/examples/Felix/Configuration.h | 23 +++++++-- .../examples/Felix/DUAL/Configuration.h | 23 +++++++-- .../FolgerTech/i3-2020/Configuration.h | 23 +++++++-- .../examples/Geeetech/GT2560/Configuration.h | 23 +++++++-- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 23 +++++++-- .../Prusa i3 Pro B/bltouch/Configuration.h | 23 +++++++-- .../Prusa i3 Pro B/noprobe/Configuration.h | 23 +++++++-- .../examples/Infitary/i3-M508/Configuration.h | 23 +++++++-- .../examples/JGAurora/A5/Configuration.h | 23 +++++++-- .../examples/MakerParts/Configuration.h | 23 +++++++-- .../examples/Malyan/M150/Configuration.h | 23 +++++++-- .../examples/Malyan/M200/Configuration.h | 23 +++++++-- .../Micromake/C1/basic/Configuration.h | 23 +++++++-- .../Micromake/C1/enhanced/Configuration.h | 23 +++++++-- .../config/examples/Mks/Sbase/Configuration.h | 23 +++++++-- .../RepRapWorld/Megatronics/Configuration.h | 23 +++++++-- .../config/examples/RigidBot/Configuration.h | 23 +++++++-- .../src/config/examples/SCARA/Configuration.h | 23 +++++++-- .../config/examples/STM32F10/Configuration.h | 23 +++++++-- .../examples/Sanguinololu/Configuration.h | 23 +++++++-- .../config/examples/TheBorg/Configuration.h | 23 +++++++-- .../config/examples/TinyBoy2/Configuration.h | 23 +++++++-- .../config/examples/Tronxy/X1/Configuration.h | 23 +++++++-- .../examples/Tronxy/X5S/Configuration.h | 23 +++++++-- .../examples/Tronxy/XY100/Configuration.h | 23 +++++++-- .../UltiMachine/Archim2/Configuration.h | 23 +++++++-- .../examples/Velleman/K8200/Configuration.h | 23 +++++++-- .../examples/Velleman/K8400/Configuration.h | 23 +++++++-- .../Velleman/K8400/Dual-head/Configuration.h | 23 +++++++-- .../Wanhao/Duplicator 6/Configuration.h | 23 +++++++-- .../examples/adafruit/ST7565/Configuration.h | 23 +++++++-- .../FLSUN/auto_calibrate/Configuration.h | 23 +++++++-- .../delta/FLSUN/kossel/Configuration.h | 23 +++++++-- .../delta/FLSUN/kossel_mini/Configuration.h | 23 +++++++-- .../examples/delta/generic/Configuration.h | 23 +++++++-- .../delta/kossel_mini/Configuration.h | 23 +++++++-- .../examples/delta/kossel_pro/Configuration.h | 23 +++++++-- .../examples/delta/kossel_xl/Configuration.h | 23 +++++++-- .../examples/gCreate/gMax1.5+/Configuration.h | 23 +++++++-- .../config/examples/makibox/Configuration.h | 23 +++++++-- .../examples/stm32f103ret6/Configuration.h | 23 +++++++-- .../examples/tvrrug/Round2/Configuration.h | 23 +++++++-- .../src/config/examples/wt150/Configuration.h | 23 +++++++-- Marlin/src/inc/Conditionals_post.h | 24 +++++++++ Marlin/src/inc/SanityCheck.h | 33 ++++++++++++- Marlin/src/module/endstops.cpp | 26 ++++++++++ 66 files changed, 1182 insertions(+), 325 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9067655033..cf24356c63 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp index 94026f27a7..7a027f6d25 100644 --- a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp @@ -71,7 +71,7 @@ extern "C" void delay(const int msec) { // IO functions // As defined by Arduino INPUT(0x0), OUPUT(0x1), INPUT_PULLUP(0x2) -void pinMode(pin_t pin, uint8_t mode) { +void pinMode(const pin_t pin, const uint8_t mode) { if (!VALID_PIN(pin)) return; PINSEL_CFG_Type config = { LPC1768_PIN_PORT(pin), @@ -79,23 +79,24 @@ void pinMode(pin_t pin, uint8_t mode) { PINSEL_FUNC_0, PINSEL_PINMODE_TRISTATE, PINSEL_PINMODE_NORMAL }; - switch(mode) { - case INPUT: - LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR &= ~LPC_PIN(LPC1768_PIN_PIN(pin)); - PINSEL_ConfigPin(&config); - break; - case OUTPUT: - LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR |= LPC_PIN(LPC1768_PIN_PIN(pin)); - PINSEL_ConfigPin(&config); - break; - case INPUT_PULLUP: - LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR &= ~LPC_PIN(LPC1768_PIN_PIN(pin)); - config.Pinmode = PINSEL_PINMODE_PULLUP; - PINSEL_ConfigPin(&config); - break; - default: - break; + switch (mode) { + case INPUT: + LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR &= ~LPC_PIN(LPC1768_PIN_PIN(pin)); + break; + case OUTPUT: + LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR |= LPC_PIN(LPC1768_PIN_PIN(pin)); + break; + case INPUT_PULLUP: + LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR &= ~LPC_PIN(LPC1768_PIN_PIN(pin)); + config.Pinmode = PINSEL_PINMODE_PULLUP; + break; + case INPUT_PULLDOWN: + LPC_GPIO(LPC1768_PIN_PORT(pin))->FIODIR &= ~LPC_PIN(LPC1768_PIN_PIN(pin)); + config.Pinmode = PINSEL_PINMODE_PULLDOWN; + break; + default: return; } + PINSEL_ConfigPin(&config); } void digitalWrite(pin_t pin, uint8_t pin_status) { @@ -108,13 +109,13 @@ void digitalWrite(pin_t pin, uint8_t pin_status) { pinMode(pin, OUTPUT); // Set pin mode on every write (Arduino version does this) - /** - * Must be done AFTER the output state is set. Doing this before will cause a - * 2uS glitch if writing a "1". - * - * When the Port Direction bit is written to a "1" the output is immediately set - * to the value of the FIOPIN bit which is "0" because of power up defaults. - */ + /** + * Must be done AFTER the output state is set. Doing this before will cause a + * 2uS glitch if writing a "1". + * + * When the Port Direction bit is written to a "1" the output is immediately set + * to the value of the FIOPIN bit which is "0" because of power up defaults. + */ } bool digitalRead(pin_t pin) { diff --git a/Marlin/src/HAL/HAL_LPC1768/fastio.h b/Marlin/src/HAL/HAL_LPC1768/fastio.h index d86cc81cc2..513b77601f 100644 --- a/Marlin/src/HAL/HAL_LPC1768/fastio.h +++ b/Marlin/src/HAL/HAL_LPC1768/fastio.h @@ -85,6 +85,9 @@ bool useable_hardware_PWM(pin_t pin); /// set pin as input with pullup mode #define _PULLUP(IO, v) (pinMode(IO, (v!=LOW ? INPUT_PULLUP : INPUT))) +/// set pin as input with pulldown mode +#define _PULLDOWN(IO, v) (pinMode(IO, (v!=LOW ? INPUT_PULLDOWN : INPUT))) + // hg42: all pins can be input or output (I hope) // hg42: undefined pins create compile error (IO, is no pin) // hg42: currently not used, but was used by pinsDebug @@ -119,6 +122,8 @@ bool useable_hardware_PWM(pin_t pin); #define SET_INPUT(IO) _SET_INPUT(IO) /// set pin as input with pullup wrapper #define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0) +/// set pin as input with pulldown wrapper +#define SET_INPUT_PULLDOWN(IO) do{ _SET_INPUT(IO); _PULLDOWN(IO, HIGH); }while(0) /// set pin as output wrapper - reads the pin and sets the output to that value #define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0) diff --git a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h index f823df9470..7ce8ff1b41 100644 --- a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h +++ b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h @@ -31,9 +31,10 @@ #define HIGH 0x01 #define LOW 0x00 -#define INPUT 0x00 -#define OUTPUT 0x01 -#define INPUT_PULLUP 0x02 +#define INPUT 0x00 +#define OUTPUT 0x01 +#define INPUT_PULLUP 0x02 +#define INPUT_PULLDOWN 0x03 #define LSBFIRST 0 #define MSBFIRST 1 @@ -104,7 +105,7 @@ void delayMicroseconds(unsigned long); uint32_t millis(); //IO functions -void pinMode(pin_t, uint8_t); +void pinMode(const pin_t, const uint8_t); void digitalWrite(pin_t, uint8_t); bool digitalRead(pin_t); void analogWrite(pin_t, int); diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index b53c2e35c0..a85e3a6fd5 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -219,8 +219,10 @@ void setup_killpin() { #if ENABLED(FILAMENT_RUNOUT_SENSOR) void setup_filrunoutpin() { - #if ENABLED(ENDSTOPPULLUP_FIL_RUNOUT) + #if ENABLED(FIL_RUNOUT_PULLUP) SET_INPUT_PULLUP(FIL_RUNOUT_PIN); + #elif ENABLED(FIL_RUNOUT_PULLDOWN) + SET_INPUT_PULLDOWN(FIL_RUNOUT_PIN); #else SET_INPUT(FIL_RUNOUT_PIN); #endif diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 9067655033..cf24356c63 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index bbf0174cb7..8ad981a958 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -520,11 +520,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -534,6 +533,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -870,7 +882,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 629a2373ab..dd908e6fa5 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -500,11 +500,10 @@ #define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 2a4365b245..ca87da4a53 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -520,11 +520,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -534,6 +533,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -960,7 +972,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 21f94a4ae2..351f09aa2a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -507,11 +507,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -521,6 +520,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -857,7 +869,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index 52e66bdc2b..fa5b0ed413 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -500,11 +500,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index b8712d93e6..98ae18886d 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -500,11 +500,10 @@ #define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 0c3da39401..a58d23228e 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -500,11 +500,10 @@ #define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 4cd46632b3..70f744fb69 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -488,11 +488,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -502,6 +501,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -838,7 +850,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 548fb91f57..2a25829f51 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -501,11 +501,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -515,6 +514,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -851,7 +863,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index b1c2d0d8b5..bb9d6624a3 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -488,11 +488,10 @@ #define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -502,6 +501,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -838,7 +850,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 0f2e7a3ad7..2f1fc9c256 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -499,11 +499,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -513,6 +512,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -849,7 +861,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 6b6f25d94e..5dbc3f98d2 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -510,11 +510,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +//#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -524,6 +523,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -860,7 +872,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index aa846fa800..b41a6af23a 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -491,11 +491,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -505,6 +504,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -841,7 +853,8 @@ #define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor #endif diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration.h b/Marlin/src/config/examples/Creality/Ender/Configuration.h index 527ebb9d12..17187c627e 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration.h @@ -495,11 +495,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -509,6 +508,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -845,7 +857,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index ebdd8aa224..e55d05b0ef 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -481,11 +481,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -495,6 +494,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -832,7 +844,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 05179bb0c2..1514fdbb47 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -481,11 +481,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -495,6 +494,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -832,7 +844,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 35f1f85855..2057a118c2 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -506,11 +506,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -520,6 +519,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -856,7 +868,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index afac31e5fd..491e1a9778 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -515,11 +515,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -529,6 +528,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -865,7 +877,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 5202fa01c0..892fb0f5a7 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index ecd3f4a1e8..26dc453de3 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -506,11 +506,10 @@ //#define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -520,6 +519,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -857,7 +869,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 02120488a1..12a35d0bd8 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -506,11 +506,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -520,6 +519,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -856,7 +868,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 555e22fe13..b301879d0b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -504,11 +504,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -518,6 +517,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -854,7 +866,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index 077733ca92..9a5ad02f2c 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -512,11 +512,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -526,6 +525,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -862,7 +874,8 @@ #define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index f37476dbe4..1658ee8c91 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -520,11 +520,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually #define ENDSTOPPULLUP_XMAX #define ENDSTOPPULLUP_YMAX #define ENDSTOPPULLUP_ZMAX @@ -534,6 +533,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -870,7 +882,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index e6a2e35d92..a6f7d8ab61 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -508,11 +508,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -522,6 +521,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -874,7 +886,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index 6a2e6a0a8c..eb7d363e36 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -499,11 +499,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -513,6 +512,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -849,7 +861,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index d85e0aa306..2553a0941d 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -854,7 +866,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index afbfc88327..f9bdfffcf9 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -854,7 +866,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index fcad29805f..3367e58f44 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index e065e0f2d4..ac21eafc08 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 376c949770..5f159e7364 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -496,11 +496,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -510,6 +509,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -848,7 +860,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 617ecb5b93..2a484eec21 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -512,11 +512,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +//#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX #define ENDSTOPPULLUP_ZMAX // open pin, inverted @@ -526,6 +525,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -862,7 +874,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index affc796675..cbe8f9132f 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -502,11 +502,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -516,6 +515,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -853,7 +865,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 239cf8d654..f71e8afb03 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -881,7 +893,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index 8ade003454..d9e02d302a 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index a858ab9c20..200ba46e4c 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -551,11 +551,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -565,6 +564,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -906,7 +918,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index e74543b69a..4094ce9c97 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -491,11 +491,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -505,6 +504,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -841,7 +853,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 38a6a31d10..c3a702c08c 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index 86d3223fa8..05c9d5c5fe 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -511,11 +511,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -525,6 +524,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -861,7 +873,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index af734b0632..7ba022e953 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -491,11 +491,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -505,6 +504,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -841,7 +853,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index ecc36d7175..3bda3d916e 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -530,11 +530,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -544,6 +543,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -880,7 +892,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 5e6092b26a..af8cb486c3 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 2e0c436c23..b89dc34f49 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index 0887fc401c..7c0b4ebf3a 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -501,11 +501,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -515,6 +514,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -851,7 +863,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index fb48c5ba5f..694114a068 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -500,11 +500,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -514,6 +513,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -850,7 +862,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 7ab6cb2e9f..566999d9ff 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -579,11 +579,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -593,6 +592,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -980,7 +992,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index 99e455f7b2..b0337664ac 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -570,11 +570,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -584,6 +583,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -971,7 +983,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 787212c401..4d77c12303 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -579,11 +579,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -593,6 +592,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -980,7 +992,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index c67f53f394..d68180fdbc 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -569,11 +569,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -583,6 +582,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -967,7 +979,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 6ebfebf86c..37861cf34d 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -569,11 +569,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -583,6 +582,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -970,7 +982,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index f9e738e406..92baecf1d4 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -555,11 +555,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -569,6 +568,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -970,7 +982,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 4ed9781256..69072e41e7 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -573,11 +573,10 @@ #define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +//#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually #define ENDSTOPPULLUP_XMAX #define ENDSTOPPULLUP_YMAX #define ENDSTOPPULLUP_ZMAX @@ -587,6 +586,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -979,7 +991,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 9053afb07c..1ec4ef5d0a 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -513,11 +513,10 @@ #define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +//#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -527,6 +526,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -864,7 +876,8 @@ #define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index d063628ea2..7cd89708b1 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -503,11 +503,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -517,6 +516,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -853,7 +865,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index cde085afb6..efe907f376 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -502,11 +502,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -516,6 +515,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. @@ -851,7 +863,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 07d0dcd91f..ef95a091b1 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -489,11 +489,10 @@ //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -503,6 +502,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -845,7 +857,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 3520789b12..677d44c9ed 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -505,11 +505,10 @@ //#define USE_YMAX_PLUG #define USE_ZMAX_PLUG -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + // Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX @@ -519,6 +518,19 @@ //#define ENDSTOPPULLUP_ZMIN_PROBE #endif +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). #define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. @@ -855,7 +867,8 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FILAMENT_RUNOUT_SCRIPT "M600" #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 7d088dbd5c..8ad079d3a6 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -616,6 +616,30 @@ #endif #endif +/** + * Set ENDSTOPPULLDOWNS for active endstop switches + */ +#if ENABLED(ENDSTOPPULLDOWNS) + #if ENABLED(USE_XMAX_PLUG) + #define ENDSTOPPULLDOWN_XMAX + #endif + #if ENABLED(USE_YMAX_PLUG) + #define ENDSTOPPULLDOWN_YMAX + #endif + #if ENABLED(USE_ZMAX_PLUG) + #define ENDSTOPPULLDOWN_ZMAX + #endif + #if ENABLED(USE_XMIN_PLUG) + #define ENDSTOPPULLDOWN_XMIN + #endif + #if ENABLED(USE_YMIN_PLUG) + #define ENDSTOPPULLDOWN_YMIN + #endif + #if ENABLED(USE_ZMIN_PLUG) + #define ENDSTOPPULLDOWN_ZMIN + #endif +#endif + /** * Shorthand for pin tests, used wherever needed */ diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 03ace21c3c..f5bd21ec21 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -78,7 +78,9 @@ #elif defined(SDEXTRASLOW) #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead." #elif defined(FILAMENT_SENSOR) - #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead." + #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR. Please update your configuration." +#elif defined(ENDSTOPPULLUP_FIL_RUNOUT) + #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP. Please update your configuration." #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS) #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead." #elif defined(LANGUAGE_INCLUDE) @@ -323,6 +325,35 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #endif #endif +#if !defined(TARGET_LPC1768) && ( \ + ENABLED(ENDSTOPPULLDOWNS) \ + || ENABLED(ENDSTOPPULLDOWN_XMAX) \ + || ENABLED(ENDSTOPPULLDOWN_YMAX) \ + || ENABLED(ENDSTOPPULLDOWN_ZMAX) \ + || ENABLED(ENDSTOPPULLDOWN_XMIN) \ + || ENABLED(ENDSTOPPULLDOWN_YMIN) \ + || ENABLED(ENDSTOPPULLDOWN_ZMIN) ) + #error "PULLDOWN pin mode is not available on the selected board." +#endif + +#if ENABLED(ENDSTOPPULLUPS) && ENABLED(ENDSTOPPULLDOWNS) + #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS." +#elif ENABLED(FIL_RUNOUT_PULLUP) && ENABLED(FIL_RUNOUT_PULLDOWN) + #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN." +#elif ENABLED(ENDSTOPPULLUP_XMAX) && ENABLED(ENDSTOPPULLDOWN_XMAX) + #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX." +#elif ENABLED(ENDSTOPPULLUP_YMAX) && ENABLED(ENDSTOPPULLDOWN_YMAX) + #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX." +#elif ENABLED(ENDSTOPPULLUP_ZMAX) && ENABLED(ENDSTOPPULLDOWN_ZMAX) + #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX." +#elif ENABLED(ENDSTOPPULLUP_XMIN) && ENABLED(ENDSTOPPULLDOWN_XMIN) + #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN." +#elif ENABLED(ENDSTOPPULLUP_YMIN) && ENABLED(ENDSTOPPULLDOWN_YMIN) + #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN." +#elif ENABLED(ENDSTOPPULLUP_ZMIN) && ENABLED(ENDSTOPPULLDOWN_ZMIN) + #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN." +#endif + /** * Progress Bar */ diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index c57c71ff8f..9b424a95c4 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -73,6 +73,8 @@ void Endstops::init() { #if HAS_X_MIN #if ENABLED(ENDSTOPPULLUP_XMIN) SET_INPUT_PULLUP(X_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_XMIN) + SET_INPUT_PULLDOWN(X_MIN_PIN); #else SET_INPUT(X_MIN_PIN); #endif @@ -81,6 +83,8 @@ void Endstops::init() { #if HAS_X2_MIN #if ENABLED(ENDSTOPPULLUP_XMIN) SET_INPUT_PULLUP(X2_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_XMIN) + SET_INPUT_PULLDOWN(X2_MIN_PIN); #else SET_INPUT(X2_MIN_PIN); #endif @@ -89,6 +93,8 @@ void Endstops::init() { #if HAS_Y_MIN #if ENABLED(ENDSTOPPULLUP_YMIN) SET_INPUT_PULLUP(Y_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_YMIN) + SET_INPUT_PULLDOWN(Y_MIN_PIN); #else SET_INPUT(Y_MIN_PIN); #endif @@ -97,6 +103,8 @@ void Endstops::init() { #if HAS_Y2_MIN #if ENABLED(ENDSTOPPULLUP_YMIN) SET_INPUT_PULLUP(Y2_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_YMIN) + SET_INPUT_PULLDOWN(Y2_MIN_PIN); #else SET_INPUT(Y2_MIN_PIN); #endif @@ -105,6 +113,8 @@ void Endstops::init() { #if HAS_Z_MIN #if ENABLED(ENDSTOPPULLUP_ZMIN) SET_INPUT_PULLUP(Z_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) + SET_INPUT_PULLDOWN(Z_MIN_PIN); #else SET_INPUT(Z_MIN_PIN); #endif @@ -113,6 +123,8 @@ void Endstops::init() { #if HAS_Z2_MIN #if ENABLED(ENDSTOPPULLUP_ZMIN) SET_INPUT_PULLUP(Z2_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) + SET_INPUT_PULLDOWN(Z2_MIN_PIN); #else SET_INPUT(Z2_MIN_PIN); #endif @@ -121,6 +133,8 @@ void Endstops::init() { #if HAS_X_MAX #if ENABLED(ENDSTOPPULLUP_XMAX) SET_INPUT_PULLUP(X_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_XMAX) + SET_INPUT_PULLDOWN(X_MAX_PIN); #else SET_INPUT(X_MAX_PIN); #endif @@ -129,6 +143,8 @@ void Endstops::init() { #if HAS_X2_MAX #if ENABLED(ENDSTOPPULLUP_XMAX) SET_INPUT_PULLUP(X2_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_XMAX) + SET_INPUT_PULLDOWN(X2_MAX_PIN); #else SET_INPUT(X2_MAX_PIN); #endif @@ -137,6 +153,8 @@ void Endstops::init() { #if HAS_Y_MAX #if ENABLED(ENDSTOPPULLUP_YMAX) SET_INPUT_PULLUP(Y_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_YMAX) + SET_INPUT_PULLDOWN(Y_MAX_PIN); #else SET_INPUT(Y_MAX_PIN); #endif @@ -145,6 +163,8 @@ void Endstops::init() { #if HAS_Y2_MAX #if ENABLED(ENDSTOPPULLUP_YMAX) SET_INPUT_PULLUP(Y2_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_YMAX) + SET_INPUT_PULLDOWN(Y2_MAX_PIN); #else SET_INPUT(Y2_MAX_PIN); #endif @@ -153,6 +173,8 @@ void Endstops::init() { #if HAS_Z_MAX #if ENABLED(ENDSTOPPULLUP_ZMAX) SET_INPUT_PULLUP(Z_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) + SET_INPUT_PULLDOWN(Z_MAX_PIN); #else SET_INPUT(Z_MAX_PIN); #endif @@ -161,6 +183,8 @@ void Endstops::init() { #if HAS_Z2_MAX #if ENABLED(ENDSTOPPULLUP_ZMAX) SET_INPUT_PULLUP(Z2_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) + SET_INPUT_PULLDOWN(Z2_MAX_PIN); #else SET_INPUT(Z2_MAX_PIN); #endif @@ -169,6 +193,8 @@ void Endstops::init() { #if ENABLED(Z_MIN_PROBE_ENDSTOP) #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE) SET_INPUT_PULLUP(Z_MIN_PROBE_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE) + SET_INPUT_PULLDOWN(Z_MIN_PROBE_PIN); #else SET_INPUT(Z_MIN_PROBE_PIN); #endif