From 2a18869b506697220ff2ae09f481d61d40d3a3cd Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Tue, 17 Apr 2018 10:14:21 -0400 Subject: [PATCH] Breakout for sd detect pin --- Marlin/Configuration.h | 2 +- Marlin/Configuration_adv.h | 7 +++-- Marlin/pins_RAMPS.h | 58 +++++++++++++++++++++++++++----------- 3 files changed, 47 insertions(+), 20 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b7065c6680..211dab1751 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -155,7 +155,7 @@ //#define ABL_BI #define ABL_UBL - +//#define BoardRev2 #if(!ENABLED(MachineCR10Orig)) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b2810b2162..e43a524a66 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -514,7 +514,7 @@ #define LCD_TIMEOUT_TO_STATUS 15000 // Add an 'M73' G-code to set the current percentage -//#define LCD_SET_PROGRESS_MANUALLY +#define LCD_SET_PROGRESS_MANUALLY #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing @@ -551,6 +551,7 @@ // as SD_DETECT_PIN in your board's pins definitions. // This setting should be disabled unless you are using a push button, pulling the pin to ground. // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished @@ -604,7 +605,7 @@ #endif // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT + #define LONG_FILENAME_HOST_SUPPORT // Enable this option to scroll long filenames in the SD card menu #define SCROLL_LONG_FILENAMES @@ -626,7 +627,7 @@ /** * Auto-report SdCard status with M27 S */ - //#define AUTO_REPORT_SD_STATUS + #define AUTO_REPORT_SD_STATUS #endif // SDSUPPORT diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index e886a616f6..47113da56b 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -422,9 +422,13 @@ #endif #define BTN_ENC 35 - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 - + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + + #else + #define SD_DETECT_PIN -1 + #endif + #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) #define LCD_BACKLIGHT_PIN 39 #endif @@ -434,8 +438,13 @@ #define BTN_EN1 64 #define BTN_EN2 59 #define BTN_ENC 63 - #define SD_DETECT_PIN 42 - + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + #else + #define SD_DETECT_PIN -1 + #endif + #define KILL_PIN 41 + #elif ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 47 @@ -451,7 +460,7 @@ #define BTN_ENC -1 #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 + //#define SD_DETECT_PIN 49 #elif ENABLED(VIKI2) || ENABLED(miniVIKI) @@ -482,8 +491,12 @@ #define BTN_EN2 37 #define BTN_ENC 31 - #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 + #define LCD_SDSS SDSS + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + #else + #define SD_DETECT_PIN -1 + #endif #define KILL_PIN 41 #elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6 @@ -506,9 +519,13 @@ #define BTN_EN2 33 #define BTN_ENC 35 - #define SD_DETECT_PIN 49 - #define KILL_PIN 64 - + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + #else + #define SD_DETECT_PIN -1 + #endif + #define KILL_PIN 41 + #elif ENABLED(MINIPANEL) #define BEEPER_PIN 42 @@ -529,9 +546,13 @@ #define BTN_EN2 63 #define BTN_ENC 59 - #define SD_DETECT_PIN 49 - #define KILL_PIN 64 - + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + #else + #define SD_DETECT_PIN -1 + #endif + #define KILL_PIN 41 + #elif ENABLED(ZONESTAR_LCD) #define ADC_KEYPAD_PIN 12 @@ -560,8 +581,13 @@ #endif #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #if(ENABLED(BoardRev2)) + #define SD_DETECT_PIN 49 + #else + #define SD_DETECT_PIN -1 + #endif + #define KILL_PIN 41 + #endif #endif