From dc202b3cb3c2f91e2f7dcf582da46d2182cd2782 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 2 Jun 2021 15:34:03 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20stops,=20sdss=20pin?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 4 +- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 6 +-- Marlin/src/pins/ramps/pins_3DRAG.h | 11 +++-- Marlin/src/pins/ramps/pins_COPYMASTER_3D.h | 8 ++-- Marlin/src/pins/ramps/pins_K8600.h | 7 +--- Marlin/src/pins/ramps/pins_RAMPS.h | 4 +- Marlin/src/pins/sam/pins_ADSK.h | 6 +-- Marlin/src/pins/sam/pins_DUE3DOM.h | 3 -- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 27 +++++-------- Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 6 +-- Marlin/src/pins/samd/pins_RAMPS_144.h | 40 +++++++++---------- Marlin/src/pins/stm32f1/pins_BEAST.h | 26 ++++-------- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 31 ++++---------- Marlin/src/pins/stm32f1/pins_MALYAN_M200.h | 8 ++-- Marlin/src/pins/stm32f1/pins_MORPHEUS.h | 6 +-- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 2 +- .../src/pins/stm32f4/pins_STEVAL_3DP001V1.h | 6 ++- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 8 ++-- 18 files changed, 84 insertions(+), 125 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 0760eee0ab..5131069f6b 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -37,8 +37,8 @@ // // Limit Switches // -#define X_MIN_PIN P1_24 -#define Y_MIN_PIN P1_26 +#define X_STOP_PIN P1_24 +#define Y_STOP_PIN P1_26 #define Z_MIN_PIN P1_28 #define Z_MAX_PIN P1_29 diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 78cf7a84fc..2972ac7560 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -40,10 +40,8 @@ // #define X_MIN_PIN P1_28 #define X_MAX_PIN P1_25 -#define Y_MIN_PIN P2_11 -#define Y_MAX_PIN -1 -#define Z_MIN_PIN P1_27 -#define Z_MAX_PIN -1 +#define Y_STOP_PIN P2_11 +#define Z_STOP_PIN P1_27 #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN P1_22 #endif diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 08354ce2ff..e78f7683f6 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -44,6 +44,11 @@ #define RAMPS_D9_PIN 8 #define MOSFET_D_PIN 12 +// +// Misc. Functions +// +#define SDSS 25 + #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header #endif @@ -66,12 +71,6 @@ // #define HEATER_2_PIN 6 -// -// Misc. Functions -// -#undef SDSS -#define SDSS 25 - #undef SD_DETECT_PIN #define SD_DETECT_PIN 53 diff --git a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h index b9eee6bd53..020941027a 100644 --- a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h +++ b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h @@ -23,10 +23,10 @@ #define BOARD_INFO_NAME "Copymaster 3D RAMPS" -#define Z_STEP_PIN 47 -#define Y_MAX_PIN 14 -#define FIL_RUNOUT_PIN 15 -#define SD_DETECT_PIN 66 +#define Z_STEP_PIN 47 +#define Y_MAX_PIN 14 +#define FIL_RUNOUT_PIN 15 +#define SD_DETECT_PIN 66 // // Import RAMPS 1.4 pins diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index 1a396b20f4..c2d91ad7ee 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -47,6 +47,7 @@ // // Misc. Functions // +#define SDSS 25 #define CASE_LIGHT_PIN 7 // @@ -87,12 +88,6 @@ // #undef HEATER_BED_PIN -// -// Misc. Functions -// -#undef SDSS -#define SDSS 25 // 53 - // // LCD / Controller // diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index f30a235626..c2d4dbeb3f 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -241,7 +241,9 @@ // // Misc. Functions // -#define SDSS EXP2_07_PIN +#ifndef SDSS + #define SDSS EXP2_07_PIN +#endif #define LED_PIN 13 #ifndef FILWIDTH_PIN diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index 9026ca7771..6fe0520f81 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -86,9 +86,9 @@ A stepper for E0 extruder // // Limit Switches // -#define X_MIN_PIN 9 -#define Y_MIN_PIN 10 -#define Z_MIN_PIN 11 +#define X_STOP_PIN 9 +#define Y_STOP_PIN 10 +#define Z_STOP_PIN 11 #define Z_MIN_PROBE_PIN 62 // Analog pin 8, Digital pin 62 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 4ebece58e4..de3cb33e8d 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -128,7 +128,6 @@ #define BTN_EN2 52 #define BTN_ENC 48 - #define SDSS 4 #define SD_DETECT_PIN 14 #elif ENABLED(RADDS_DISPLAY) @@ -141,8 +140,6 @@ #define BTN_BACK 71 - #undef SDSS - #define SDSS 4 #define SD_DETECT_PIN 14 #elif HAS_U8GLIB_I2C_OLED diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index dd8f263676..c52199a54d 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -40,12 +40,9 @@ // // Limit Switches // -#define X_MIN_PIN 38 -#define X_MAX_PIN -1 -#define Y_MIN_PIN 34 -#define Y_MAX_PIN -1 -#define Z_MIN_PIN 30 -#define Z_MAX_PIN -1 +#define X_STOP_PIN 38 +#define Y_STOP_PIN 34 +#define Z_STOP_PIN 30 // // Steppers @@ -120,7 +117,10 @@ #define BTN_EN2 52 #define BTN_ENC 48 - #define SDSS 4 + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + #define SD_DETECT_PIN 14 #elif ENABLED(RADDS_DISPLAY) @@ -133,8 +133,6 @@ #define BTN_BACK 71 - #undef SDSS - #define SDSS 4 #define SD_DETECT_PIN 14 #elif HAS_U8GLIB_I2C_OLED @@ -143,7 +141,7 @@ #define BTN_EN2 52 #define BTN_ENC 48 #define BEEPER_PIN 41 - #define LCD_SDSS 4 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 14 #elif ENABLED(SPARK_FULL_GRAPHICS) @@ -158,20 +156,17 @@ #define BEEPER_PIN -1 - #elif ENABLED(MINIPANEL) + #elif ENABLED(MINIPANEL) + #define BTN_EN1 52 #define BTN_EN2 50 #define BTN_ENC 48 - #define LCD_SDSS 4 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 14 #define BEEPER_PIN 41 #define DOGLCD_A0 46 #define DOGLCD_CS 45 - #endif // SPARK_FULL_GRAPHICS - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index 874950f34b..aa01a9227f 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -40,9 +40,9 @@ // // Limit Switches // -#define X_MIN_PIN 22 // PB26 -#define Y_MAX_PIN 18 // PA11 -#define Z_MIN_PIN 19 // PA10 +#define X_STOP_PIN 22 // PB26 +#define Y_STOP_PIN 18 // PA11 +#define Z_STOP_PIN 19 // PA10 // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 8311ac9012..fbd9d7c864 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -130,7 +130,6 @@ // // Misc. Functions // -#define SDSS 53 #define LED_PIN 13 #ifndef FILWIDTH_PIN @@ -252,6 +251,21 @@ #endif #endif +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define SDSS 83 + #undef SD_DETECT_PIN + #define SD_DETECT_PIN 95 +#else + #define SDSS 53 +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -356,6 +370,9 @@ #else #define BTN_EN1 31 #define BTN_EN2 33 + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif #endif #define BTN_ENC 35 @@ -365,8 +382,7 @@ #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) - // TO TEST - //#define LCD_BACKLIGHT_PIN 39 + //#define LCD_BACKLIGHT_PIN 39 // TO TEST #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -563,22 +579,4 @@ #endif #endif // IS_NEWPANEL - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif // HAS_WIRED_LCD - -// -// SD Support -// -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -#if SD_CONNECTION_IS(ONBOARD) - #undef SDSS - #define SDSS 83 - #undef SD_DETECT_PIN - #define SD_DETECT_PIN 95 -#endif diff --git a/Marlin/src/pins/stm32f1/pins_BEAST.h b/Marlin/src/pins/stm32f1/pins_BEAST.h index 05f77f1029..2ace47822e 100644 --- a/Marlin/src/pins/stm32f1/pins_BEAST.h +++ b/Marlin/src/pins/stm32f1/pins_BEAST.h @@ -36,34 +36,27 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +// +// Limit Switches +// +#define X_STOP_PIN PD5 +#define Y_STOP_PIN PD6 +#define Z_STOP_PIN PD7 + // // Steppers // #define X_STEP_PIN PE0 #define X_DIR_PIN PE1 #define X_ENABLE_PIN PC0 -#define X_MIN_PIN PD5 -#define X_MAX_PIN -1 #define Y_STEP_PIN PE2 #define Y_DIR_PIN PE3 #define Y_ENABLE_PIN PC1 -#define Y_MIN_PIN PD6 -#define Y_MAX_PIN #define Z_STEP_PIN PE4 #define Z_DIR_PIN PE5 #define Z_ENABLE_PIN PC2 -#define Z_MIN_PIN PD7 -#define Z_MAX_PIN -1 - -#define Y2_STEP_PIN -1 -#define Y2_DIR_PIN -1 -#define Y2_ENABLE_PIN -1 - -#define Z2_STEP_PIN -1 -#define Z2_DIR_PIN -1 -#define Z2_ENABLE_PIN -1 #define E0_STEP_PIN PE6 #define E0_DIR_PIN PE7 @@ -87,9 +80,6 @@ #define SDSS PA15 #define LED_PIN PB2 -#define PS_ON_PIN -1 -#define KILL_PIN -1 - // // Heaters / Fans // @@ -98,8 +88,6 @@ #define HEATER_2_PIN PD14 #define HEATER_BED_PIN PB9 // BED -#define HEATER_BED2_PIN -1 // BED2 -#define HEATER_BED3_PIN -1 // BED3 #ifndef FAN_PIN #define FAN_PIN PB10 diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index dd6edf9024..c2025ba8c0 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -38,47 +38,32 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +// +// Limit Switches +// +#define X_STOP_PIN PG10 +#define Y_STOP_PIN PA12 +#define Z_STOP_PIN PA14 + // // Steppers // #define X_STEP_PIN PE5 #define X_DIR_PIN PE6 #define X_ENABLE_PIN PC13 -#define X_MIN_PIN PG10 -#define X_MAX_PIN -1 #define Y_STEP_PIN PE2 #define Y_DIR_PIN PE3 #define Y_ENABLE_PIN PE4 -#define Y_MIN_PIN PA12 -#define Y_MAX_PIN #define Z_STEP_PIN PB9 #define Z_DIR_PIN PE0 #define Z_ENABLE_PIN PE1 -#define Z_MIN_PIN PA14 -#define Z_MAX_PIN -1 - -#define Y2_STEP_PIN -1 -#define Y2_DIR_PIN -1 -#define Y2_ENABLE_PIN -1 - -#define Z2_STEP_PIN -1 -#define Z2_DIR_PIN -1 -#define Z2_ENABLE_PIN -1 #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB5 #define E0_ENABLE_PIN PB8 -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 - -#define E2_STEP_PIN -1 -#define E2_DIR_PIN -1 -#define E2_ENABLE_PIN -1 - // // Misc. Functions // @@ -114,8 +99,6 @@ // #define TEMP_BED_PIN PA0 // Analog Input #define TEMP_0_PIN PA1 // Analog Input -#define TEMP_1_PIN -1 // Analog Input -#define TEMP_2_PIN -1 // Analog Input // // LCD Pins diff --git a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h index e33e029deb..32d1937653 100644 --- a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h +++ b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h @@ -41,7 +41,7 @@ #define FLASH_EEPROM_EMULATION #endif -#define SDSS SD_SS_PIN +#define SDSS SD_SS_PIN // Also in HAL/STM32F1/spi_pins.h // Based on PWM timer usage, we have to use these timers and soft PWM for the fans // On STM32F103: @@ -53,9 +53,9 @@ // // Limit Switches // -#define X_MIN_PIN PB4 -#define Y_MIN_PIN PA15 -#define Z_MIN_PIN PB5 +#define X_STOP_PIN PB4 +#define Y_STOP_PIN PA15 +#define Z_STOP_PIN PB5 // // Steppers diff --git a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h index 05e02c9e4d..87919c12f4 100644 --- a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h +++ b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h @@ -39,9 +39,9 @@ // // Limit Switches // -#define X_MIN_PIN PB14 -#define Y_MIN_PIN PB13 -#define Z_MIN_PIN PB12 +#define X_STOP_PIN PB14 +#define Y_STOP_PIN PB13 +#define Z_STOP_PIN PB12 // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index d25ca1bd2e..7171de919d 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -24,7 +24,7 @@ #include "env_validate.h" /** - * 21017 Victor Perez Marlin for stm32f1 test + * 10 Dec 2017 Victor Perez Marlin for stm32f1 test */ #define BOARD_INFO_NAME "STM3R Mini" diff --git a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h index dc02fd02ea..5f8ffe975b 100644 --- a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h +++ b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h @@ -173,7 +173,6 @@ // // Misc functions // -#define SDSS 16 // PA4 SPI_CS #define LED_PIN -1 // 9 // PE1 green LED Heart beat #define PS_ON_PIN -1 #define KILL_PIN -1 @@ -245,7 +244,6 @@ #ifndef SDIO_SUPPORT #define SOFTWARE_SPI // Use soft SPI for onboard SD - #undef SDSS #define SDSS SDIO_D3_PIN #define SD_SCK_PIN SDIO_CK_PIN #define SD_MISO_PIN SDIO_D0_PIN @@ -253,6 +251,10 @@ #endif #endif +#ifndef SDSS + #define SDSS 16 // PA4 SPI_CS +#endif + // OTG // 30 // PA11 OTG_DM // 31 // PA12 OTG_DP diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 7b3685d08e..cb038fe737 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -116,7 +116,6 @@ // // Misc. Functions // -#define SDSS 26 // B6 SDCS #define FILWIDTH_PIN 2 // Analog Input // @@ -142,7 +141,6 @@ #define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_ENC 45 // F7 TDI JP2-12 - #undef SDSS #define SDSS 43 // F5 TMS JP2-8 #define STAT_LED_RED_PIN 12 // C2 JP11-14 @@ -153,7 +151,7 @@ #define BTN_EN1 3 // D3 RX1 JP2-7 #define BTN_EN2 2 // D2 TX1 JP2-5 #define BTN_ENC 41 // F3 JP2-4 - #undef SDSS + #define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2 #else @@ -165,3 +163,7 @@ #endif #endif // IS_ULTRA_LCD && IS_NEWPANEL + +#ifndef SDSS + #define SDSS 26 // B6 SDCS +#endif