diff --git a/Marlin/pins.h b/Marlin/pins.h index 2182ba5c9..8b1aff448 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -175,7 +175,7 @@ #endif #endif -#ifdef DISABLE_MAX_ENDSTOPS +#if ENABLED(DISABLE_MAX_ENDSTOPS) #undef X_MAX_PIN #undef Y_MAX_PIN #undef Z_MAX_PIN @@ -184,7 +184,7 @@ #define Z_MAX_PIN -1 #endif -#ifdef DISABLE_MIN_ENDSTOPS +#if ENABLED(DISABLE_MIN_ENDSTOPS) #undef X_MIN_PIN #undef Y_MIN_PIN #undef Z_MIN_PIN @@ -193,36 +193,36 @@ #define Z_MIN_PIN -1 #endif -#if defined(DISABLE_Z_PROBE_ENDSTOP) || !defined(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting. +#if ENABLED(DISABLE_Z_PROBE_ENDSTOP) || DISABLED(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting. #undef Z_PROBE_PIN #define Z_PROBE_PIN -1 #endif -#ifdef DISABLE_XMAX_ENDSTOP +#if ENABLED(DISABLE_XMAX_ENDSTOP) #undef X_MAX_PIN #define X_MAX_PIN -1 #endif -#ifdef DISABLE_XMIN_ENDSTOP +#if ENABLED(DISABLE_XMIN_ENDSTOP) #undef X_MIN_PIN #define X_MIN_PIN -1 #endif -#ifdef DISABLE_YMAX_ENDSTOP +#if ENABLED(DISABLE_YMAX_ENDSTOP) #define Y_MAX_PIN -1 #endif -#ifdef DISABLE_YMIN_ENDSTOP +#if ENABLED(DISABLE_YMIN_ENDSTOP) #undef Y_MIN_PIN #define Y_MIN_PIN -1 #endif -#ifdef DISABLE_ZMAX_ENDSTOP +#if ENABLED(DISABLE_ZMAX_ENDSTOP) #undef Z_MAX_PIN #define Z_MAX_PIN -1 #endif -#ifdef DISABLE_ZMIN_ENDSTOP +#if ENABLED(DISABLE_ZMIN_ENDSTOP) #undef Z_MIN_PIN #define Z_MIN_PIN -1 #endif diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h index fa54eea61..bb8a20d89 100644 --- a/Marlin/pins_3DRAG.h +++ b/Marlin/pins_3DRAG.h @@ -29,7 +29,7 @@ #define HEATER_BED_PIN 9 // BED -#if defined(ULTRA_LCD) && defined(NEWPANEL) +#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) #undef BEEPER #define BEEPER -1 diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h index 2ac31bcf0..93998f568 100644 --- a/Marlin/pins_5DPRINT.h +++ b/Marlin/pins_5DPRINT.h @@ -52,7 +52,7 @@ // The SDSS pin uses a different pin mapping from file Sd2PinMap.h #define SDSS 20 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 9 #define MISO_PIN 11 diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index 9da88bc44..087f52f6a 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -6,7 +6,8 @@ //LCD Pins// -#if defined(VIKI2) || defined(miniVIKI) +#if ENABLED(VIKI2) || ENABLED(miniVIKI) + #define BEEPER 33 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 31 @@ -21,11 +22,14 @@ #define SDSS 53 #define SDCARDDETECT -1 // Pin 49 if using display sd interface - #ifdef TEMP_STAT_LEDS + #if ENABLED(TEMP_STAT_LEDS) #define STAT_LED_RED 64 #define STAT_LED_BLUE 63 #endif -#elif defined(TEMP_STAT_LEDS) + +#elif ENABLED(TEMP_STAT_LEDS) + #define STAT_LED_RED 6 #define STAT_LED_BLUE 11 + #endif diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 83de4520e..78fd2caae 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -18,7 +18,7 @@ //MIN endstops soldered onto the board. Delta code wants the homing endstops to be //the MAX so I swapped them here. // - #ifdef DELTA + #if ENABLED(DELTA) #undef X_MIN_PIN #undef X_MAX_PIN #undef Y_MIN_PIN @@ -34,7 +34,7 @@ #define Z_MAX_PIN 18 #endif // - #ifdef Z_PROBE_ENDSTOP + #if ENABLED(Z_PROBE_ENDSTOP) //#undef Z_MIN_PIN //#define Z_MIN_PIN 15 #define Z_PROBE_PIN 19 @@ -81,7 +81,7 @@ #undef SERVO2_PIN #undef SERVO3_PIN - #ifdef NUM_SERVOS + #if HAS_SERVOS #define SERVO0_PIN 47 #if NUM_SERVOS > 1 #define SERVO1_PIN -1 @@ -96,7 +96,7 @@ //LCD Pins// - #if defined(VIKI2) || defined(miniVIKI) + #if ENABLED(VIKI2) || ENABLED(miniVIKI) #define BEEPER 33 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 44 @@ -114,7 +114,7 @@ #define KILL_PIN 31 #endif - #ifdef TEMP_STAT_LEDS + #if ENABLED(TEMP_STAT_LEDS) #define STAT_LED_RED 32 #define STAT_LED_BLUE 35 #endif diff --git a/Marlin/pins_BRAINWAVE.h b/Marlin/pins_BRAINWAVE.h index 5d34ecdc3..c95a2b07c 100644 --- a/Marlin/pins_BRAINWAVE.h +++ b/Marlin/pins_BRAINWAVE.h @@ -50,7 +50,7 @@ #define KILL_PIN -1 #define ALARM_PIN -1 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 9 #define MISO_PIN 11 diff --git a/Marlin/pins_BRAINWAVE_PRO.h b/Marlin/pins_BRAINWAVE_PRO.h index 8f41431ec..a870cbeb9 100644 --- a/Marlin/pins_BRAINWAVE_PRO.h +++ b/Marlin/pins_BRAINWAVE_PRO.h @@ -56,7 +56,7 @@ #define ALARM_PIN -1 #define SDCARDDETECT 12 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 21 #define MISO_PIN 23 diff --git a/Marlin/pins_ELEFU_3.h b/Marlin/pins_ELEFU_3.h index e0e0a5096..977a92b9c 100644 --- a/Marlin/pins_ELEFU_3.h +++ b/Marlin/pins_ELEFU_3.h @@ -61,7 +61,7 @@ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ #define PHOTOGRAPH_PIN 29 -#ifdef RA_CONTROL_PANEL +#if ENABLED(RA_CONTROL_PANEL) #define SDSS 53 #define SDCARDDETECT 28 @@ -76,7 +76,7 @@ #endif // RA_CONTROL_PANEL -#ifdef RA_DISCO +#if ENABLED(RA_DISCO) //variables for which pins the TLC5947 is using #define TLC_CLOCK_PIN 25 #define TLC_BLANK_PIN 23 diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 46c414f64..6f7394e52 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -14,7 +14,7 @@ #define PS_ON_PIN 12 -#if defined(ULTRA_LCD) && defined(NEWPANEL) +#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) #define BLEN_C 2 #define BLEN_B 1 diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index ed627274c..5dac2bc7b 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -9,12 +9,12 @@ #define LARGE_FLASH true -#ifdef Z_PROBE_SLED +#if ENABLED(Z_PROBE_SLED) #define SLED_PIN -1 #endif // Servo support -#ifdef NUM_SERVOS +#if HAS_SERVOS #define SERVO0_PIN 46 //AUX3-6 #if NUM_SERVOS > 1 #define SERVO1_PIN 47 //AUX3-5 diff --git a/Marlin/pins_MINIRAMBO.h b/Marlin/pins_MINIRAMBO.h index ddeda8c00..c93d324b7 100644 --- a/Marlin/pins_MINIRAMBO.h +++ b/Marlin/pins_MINIRAMBO.h @@ -53,10 +53,10 @@ #define HEATER_1_PIN 7 #define TEMP_1_PIN 1 -#ifdef BARICUDA -#define HEATER_2_PIN 6 +#if ENABLED(BARICUDA) + #define HEATER_2_PIN 6 #else -#define HEATER_2_PIN -1 + #define HEATER_2_PIN -1 #endif #define TEMP_2_PIN -1 @@ -88,9 +88,9 @@ #define KILL_PIN -1 //80 with Smart Controller LCD #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing. -#ifdef ULTRA_LCD +#if ENABLED(ULTRA_LCD) #define KILL_PIN 32 - #ifdef NEWPANEL + #if ENABLED(NEWPANEL) //arduino pin which triggers an piezzo beeper #define BEEPER 84 // Beeper on AUX-4 #define LCD_PINS_RS 82 diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index 7d2c6d4b3..de0fbc418 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -9,7 +9,7 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif -#ifdef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. +#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. #error These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h #endif @@ -38,7 +38,7 @@ // If soft or fast PWM is off then use Teensyduino pin numbering, Marlin // fastio pin numbering otherwise -#ifdef FAN_SOFT_PWM || FAST_PWM_FAN +#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN) #define FAN_PIN 22 #else #define FAN_PIN 16 @@ -54,7 +54,7 @@ #define TEMP_0_PIN 1 // Extruder / Analog pin numbering #define TEMP_BED_PIN 0 // Bed / Analog pin numbering -#ifdef FILAMENT_SENSOR +#if ENABLED(FILAMENT_SENSOR) #define FILWIDTH_PIN 2 #endif @@ -70,18 +70,18 @@ #define KILL_PIN -1 #define ALARM_PIN -1 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 9 #define MISO_PIN 11 #define MOSI_PIN 10 #endif -#if defined(ULTRA_LCD) && defined(NEWPANEL) +#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) //we have no buzzer installed #define BEEPER -1 //LCD Pins - #ifdef LCD_I2C_PANELOLU2 + #if ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 27 //RX1 - fastio.h pin mapping 27 #define BTN_EN2 26 //TX1 - fastio.h pin mapping 26 #define BTN_ENC 43 //A3 - fastio.h pin mapping 43 @@ -91,7 +91,7 @@ #define SDCARDDETECT -1 #endif // ULTRA_LCD && NEWPANEL -#if defined(VIKI2) || defined(miniVIKI) +#if ENABLED(VIKI2) || ENABLED(miniVIKI) #define BEEPER 32 //FastIO // Pins for DOGM SPI LCD Support #define DOGLCD_A0 42 //Non-FastIO @@ -106,7 +106,7 @@ #define SDSS 45 #define SDCARDDETECT -1 // FastIO (Manual says 72 I'm not certain cause I can't test) - #ifdef TEMP_STAT_LEDS + #if ENABLED(TEMP_STAT_LEDS) #define STAT_LED_RED 12 //Non-FastIO #define STAT_LED_BLUE 10 //Non-FastIO #endif diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index 4c008d6ce..2ae4dcb78 100644 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -9,7 +9,7 @@ #define LARGE_FLASH true // Servo support -#ifdef NUM_SERVOS +#if HAS_SERVOS #define SERVO0_PIN 22 //motor header MX1 #if NUM_SERVOS > 1 #define SERVO1_PIN 23 //Motor header MX2 @@ -22,7 +22,7 @@ #endif #endif -#ifdef Z_PROBE_SLED +#if ENABLED(Z_PROBE_SLED) #define SLED_PIN -1 #endif @@ -70,7 +70,7 @@ #define HEATER_1_PIN 7 #define TEMP_1_PIN 1 -#ifdef BARICUDA +#if ENABLED(BARICUDA) #define HEATER_2_PIN 6 #else #define HEATER_2_PIN -1 @@ -109,9 +109,9 @@ #define KILL_PIN -1 //80 with Smart Controller LCD #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing. -#ifdef ULTRA_LCD +#if ENABLED(ULTRA_LCD) #define KILL_PIN 80 - #ifdef NEWPANEL + #if ENABLED(NEWPANEL) //arduino pin which triggers an piezzo beeper #define BEEPER 79 // Beeper on AUX-4 #define LCD_PINS_RS 70 @@ -164,7 +164,7 @@ #endif // ULTRA_LCD -#if defined(VIKI2) || defined(miniVIKI) +#if ENABLED(VIKI2) || ENABLED(miniVIKI) #define BEEPER 44 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 70 @@ -178,13 +178,13 @@ #define SDCARDDETECT -1 // Pin 72 if using easy adapter board - #ifdef TEMP_STAT_LEDS + #if ENABLED(TEMP_STAT_LEDS) #define STAT_LED_RED 22 #define STAT_LED_BLUE 32 #endif #endif // VIKI2/miniVIKI -#ifdef FILAMENT_SENSOR +#if ENABLED(FILAMENT_SENSOR) //Filip added pin for Filament sensor analog input #define FILWIDTH_PIN 3 #endif diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index 93dd66d95..db656b4f5 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -61,23 +61,23 @@ #define SDSS 53 #define LED_PIN 13 -#if MB(RAMPS_13_EEB) && defined(FILAMENT_SENSOR) // FMM added for Filament Extruder +#if MB(RAMPS_13_EEB) && ENABLED(FILAMENT_SENSOR) // FMM added for Filament Extruder // define analog pin for the filament width sensor input // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector #define FILWIDTH_PIN 5 #endif -#ifdef Z_PROBE_ENDSTOP +#if ENABLED(Z_PROBE_ENDSTOP) // Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop. #define Z_PROBE_PIN 32 #endif -#ifdef FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #define FILRUNOUT_PIN 4 #endif -#if MB(RAMPS_13_EFF) || defined(IS_RAMPS_EFB) +#if MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB) #define FAN_PIN 9 // (Sprinter config) #if MB(RAMPS_13_EFF) #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller @@ -90,7 +90,7 @@ #define PS_ON_PIN 12 -#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) +#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) #define KILL_PIN 41 #else #define KILL_PIN -1 @@ -102,7 +102,7 @@ #define HEATER_0_PIN 10 // EXTRUDER 1 #endif -#if MB(RAMPS_13_SF) || defined(IS_RAMPS_EFB) +#if MB(RAMPS_13_SF) || ENABLED(IS_RAMPS_EFB) #define HEATER_1_PIN -1 #else #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter) @@ -122,7 +122,7 @@ #define TEMP_BED_PIN 14 // ANALOG NUMBERING -#ifdef NUM_SERVOS +#if HAS_SERVOS #define SERVO0_PIN 11 #if NUM_SERVOS > 1 #define SERVO1_PIN 6 @@ -135,15 +135,14 @@ #endif #endif -#ifdef Z_PROBE_SLED +#if ENABLED(Z_PROBE_SLED) #define SLED_PIN -1 #endif -#ifdef ULTRA_LCD +#if ENABLED(ULTRA_LCD) - #ifdef NEWPANEL - - #ifdef PANEL_ONE + #if ENABLED(NEWPANEL) + #if ENABLED(PANEL_ONE) #define LCD_PINS_RS 40 #define LCD_PINS_ENABLE 42 #define LCD_PINS_D4 65 @@ -159,7 +158,7 @@ #define LCD_PINS_D7 29 #endif - #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER + #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) #define BEEPER 37 #define BTN_EN1 31 @@ -167,20 +166,20 @@ #define BTN_ENC 35 #define SDCARDDETECT 49 - #elif defined(LCD_I2C_PANELOLU2) + #elif ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 47 // reverse if the encoder turns the wrong way. #define BTN_EN2 43 #define BTN_ENC 32 #define LCD_SDSS 53 #define SDCARDDETECT -1 #define KILL_PIN 41 - #elif defined(LCD_I2C_VIKI) + #elif ENABLED(LCD_I2C_VIKI) #define BTN_EN1 22 // reverse if the encoder turns the wrong way. #define BTN_EN2 7 #define BTN_ENC -1 #define LCD_SDSS 53 #define SDCARDDETECT 49 - #elif defined(ELB_FULL_GRAPHIC_CONTROLLER) + #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN2 37 #define BTN_ENC 31 @@ -217,14 +216,14 @@ #define BEEPER 33 // Beeper on AUX-4 // buttons are directly attached using AUX-2 - #ifdef REPRAPWORLD_KEYPAD + #if ENABLED(REPRAPWORLD_KEYPAD) #define BTN_EN1 64 // encoder #define BTN_EN2 59 // encoder #define BTN_ENC 63 // enter button #define SHIFT_OUT 40 // shift register #define SHIFT_CLK 44 // shift register #define SHIFT_LD 42 // shift register - #elif defined(PANEL_ONE) + #elif ENABLED(PANEL_ONE) #define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN2 63 // AUX2 PIN 4 #define BTN_ENC 49 // AUX3 PIN 7 @@ -234,7 +233,7 @@ #define BTN_ENC 31 // the click #endif - #ifdef G3D_PANEL + #if ENABLED(G3D_PANEL) #define SDCARDDETECT 49 #else #define SDCARDDETECT -1 // Ramps does not use this port @@ -264,13 +263,13 @@ #endif // ULTRA_LCD // SPI for Max6675 Thermocouple -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card #else #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 52 #define MISO_PIN 50 diff --git a/Marlin/pins_RAMPS_OLD.h b/Marlin/pins_RAMPS_OLD.h index 6b3454ac8..6acf56154 100644 --- a/Marlin/pins_RAMPS_OLD.h +++ b/Marlin/pins_RAMPS_OLD.h @@ -37,7 +37,7 @@ #define PS_ON_PIN -1 #define KILL_PIN -1 -#ifdef RAMPS_V_1_0 // RAMPS_V_1_0 +#if ENABLED(RAMPS_V_1_0) // RAMPS_V_1_0 #define HEATER_0_PIN 12 // RAMPS 1.0 #define HEATER_BED_PIN -1 // RAMPS 1.0 #define FAN_PIN 11 // RAMPS 1.0 @@ -55,13 +55,13 @@ #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! // SPI for Max6675 Thermocouple -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card #else #define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 52 #define MISO_PIN 50 diff --git a/Marlin/pins_RIGIDBOARD.h b/Marlin/pins_RIGIDBOARD.h index 2846e895e..ba653deb8 100644 --- a/Marlin/pins_RIGIDBOARD.h +++ b/Marlin/pins_RIGIDBOARD.h @@ -4,7 +4,7 @@ #include "pins_RAMPS_13.h" -#ifdef Z_PROBE_ENDSTOP +#if ENABLED(Z_PROBE_ENDSTOP) #define Z_PROBE_PIN 19 #endif @@ -20,7 +20,7 @@ // LCD Panel options for the RigidBoard -#ifdef RIGIDBOT_PANEL +#if ENABLED(RIGIDBOT_PANEL) #undef BEEPER #define BEEPER -1 diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index 97f2b3c36..a98d46d30 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -33,11 +33,11 @@ #endif #endif -#ifdef Z_PROBE_SLED +#if ENABLED(Z_PROBE_SLED) #define SLED_PIN -1 #endif -#ifdef NUM_SERVOS +#if HAS_SERVOS #define SERVO0_PIN -1 #if NUM_SERVOS > 1 #define SERVO1_PIN -1 @@ -57,7 +57,7 @@ #define HEATER_1_PIN -1 #define HEATER_2_PIN -1 -#ifdef SANGUINOLOLU_V_1_2 +#if ENABLED(SANGUINOLOLU_V_1_2) #define HEATER_BED_PIN 12 // (bed) #define X_ENABLE_PIN 14 @@ -65,7 +65,7 @@ #define Z_ENABLE_PIN 26 #define E0_ENABLE_PIN 14 - #ifdef LCD_I2C_PANELOLU2 + #if ENABLED(LCD_I2C_PANELOLU2) #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan #endif @@ -92,15 +92,15 @@ */ //#define SDSS 24 -#if defined(ULTRA_LCD) && defined(NEWPANEL) +#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) // No buzzer installed #define BEEPER -1 // LCD Pins - #ifdef DOGLCD + #if ENABLED(DOGLCD) - #ifdef U8GLIB_ST7920 //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 + #if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if MB(MELZI) // Melzi board #define LCD_PINS_RS 30 //CS chip select /SS chip slave select @@ -144,7 +144,7 @@ //The encoder and click button #define BTN_EN1 11 #define BTN_EN2 10 - #ifdef LCD_I2C_PANELOLU2 + #if ENABLED(LCD_I2C_PANELOLU2) #if MB(MELZI) #define BTN_ENC 29 #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi @@ -158,9 +158,10 @@ #define SDCARDDETECT -1 -#elif defined(MAKRPANEL) +#elif ENABLED(MAKRPANEL) #define BEEPER 29 + // Pins for DOGM SPI LCD Support #define DOGLCD_A0 30 #define DOGLCD_CS 17 diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h index a05bfd7f7..6a2ebb72a 100644 --- a/Marlin/pins_SAV_MKI.h +++ b/Marlin/pins_SAV_MKI.h @@ -45,7 +45,7 @@ #define TEMP_1_PIN -1 #define TEMP_2_PIN -1 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 9 #define MISO_PIN 11 @@ -93,13 +93,13 @@ #define LCD_PINS_D6 -1 #define LCD_PINS_D7 -1 -#ifdef SAV_3DLCD +#if ENABLED(SAV_3DLCD) // For LCD SHIFT register LCD #define SR_DATA_PIN EXT_AUX_SDA_D1 #define SR_CLK_PIN EXT_AUX_SCL_D0 #endif // SAV_3DLCD -#if defined(SAV_3DLCD)||defined(SAV_3DGLCD) +#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD) #define BTN_EN1 EXT_AUX_A1_IO #define BTN_EN2 EXT_AUX_A0_IO #define BTN_ENC EXT_AUX_PWM_D24 @@ -108,6 +108,6 @@ #define HOME_PIN EXT_AUX_A4_IO #endif // SAV_3DLCD || SAV_3DGLCD -#ifdef NUM_SERVOS +#if HAS_SERVOS #define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in servo.cpp) #endif diff --git a/Marlin/pins_TEENSY2.h b/Marlin/pins_TEENSY2.h index 75344f97a..4f568b7f8 100644 --- a/Marlin/pins_TEENSY2.h +++ b/Marlin/pins_TEENSY2.h @@ -93,14 +93,14 @@ #define KILL_PIN -1 #define ALARM_PIN -1 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 21 // 9 #define MISO_PIN 23 // 11 #define MOSI_PIN 22 // 10 #endif -#ifdef ULTIPANEL +#if ENABLED(ULTIPANEL) #define LCD_PINS_RS 8 #define LCD_PINS_ENABLE 9 #define LCD_PINS_D4 10 diff --git a/Marlin/pins_TEENSYLU.h b/Marlin/pins_TEENSYLU.h index b88e5c019..745100f16 100644 --- a/Marlin/pins_TEENSYLU.h +++ b/Marlin/pins_TEENSYLU.h @@ -9,7 +9,7 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif -#ifdef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. +#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. #error These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h #endif @@ -38,7 +38,7 @@ // If soft or fast PWM is off then use Teensyduino pin numbering, Marlin // fastio pin numbering otherwise -#ifdef FAN_SOFT_PWM || FAST_PWM_FAN +#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN) #define FAN_PIN 22 #else #define FAN_PIN 16 @@ -60,18 +60,18 @@ #define KILL_PIN -1 #define ALARM_PIN -1 -#ifndef SDSUPPORT +#if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 9 #define MISO_PIN 11 #define MOSI_PIN 10 #endif -#if defined(ULTRA_LCD) && defined(NEWPANEL) +#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) //we have no buzzer installed #define BEEPER -1 //LCD Pins - #ifdef LCD_I2C_PANELOLU2 + #if ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 27 //RX1 - fastio.h pin mapping 27 #define BTN_EN2 26 //TX1 - fastio.h pin mapping 26 #define BTN_ENC 43 //A3 - fastio.h pin mapping 43 diff --git a/Marlin/pins_ULTIMAKER.h b/Marlin/pins_ULTIMAKER.h index 649ea595e..bb6e01dae 100644 --- a/Marlin/pins_ULTIMAKER.h +++ b/Marlin/pins_ULTIMAKER.h @@ -55,9 +55,9 @@ #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing. #define SERVO0_PIN 13 // untested -#ifdef ULTRA_LCD +#if ENABLED(ULTRA_LCD) - #ifdef NEWPANEL + #if ENABLED(NEWPANEL) //arduino pin witch triggers an piezzo beeper #define BEEPER 18