SD_DETECT_INVERTED => SD_DETECT_STATE (#17112)
This commit is contained in:
parent
8799f8bfdb
commit
8f66dbfcd5
6 changed files with 18 additions and 16 deletions
|
@ -1018,12 +1018,9 @@
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
|
// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
|
||||||
// around this by connecting a push button or single throw switch to the pin defined
|
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
|
||||||
// as SD_DETECT_PIN in your board's pins definitions.
|
//#define SD_DETECT_STATE HIGH
|
||||||
// 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
|
#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
|
||||||
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
|
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
|
||||||
|
|
|
@ -74,7 +74,6 @@
|
||||||
#define U8GLIB_ST7565_64128N
|
#define U8GLIB_ST7565_64128N
|
||||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
#define U8GLIB_LM6059_AF
|
#define U8GLIB_LM6059_AF
|
||||||
#define SD_DETECT_INVERTED
|
|
||||||
#elif ENABLED(AZSMZ_12864)
|
#elif ENABLED(AZSMZ_12864)
|
||||||
#define U8GLIB_ST7565_64128N
|
#define U8GLIB_ST7565_64128N
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -292,10 +292,18 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override here because this is set in Configuration_adv.h
|
* Override the SD_DETECT_STATE set in Configuration_adv.h
|
||||||
*/
|
*/
|
||||||
#if HAS_LCD_MENU && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION))
|
#if ENABLED(SDSUPPORT)
|
||||||
#undef SD_DETECT_INVERTED
|
#if HAS_LCD_MENU && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION))
|
||||||
|
#undef SD_DETECT_STATE
|
||||||
|
#if ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
|
#define SD_DETECT_STATE HIGH
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef SD_DETECT_STATE
|
||||||
|
#define SD_DETECT_STATE LOW
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -99,7 +99,9 @@
|
||||||
#elif defined(X_HOME_RETRACT_MM)
|
#elif defined(X_HOME_RETRACT_MM)
|
||||||
#error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
|
#error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
|
||||||
#elif defined(SDCARDDETECTINVERTED)
|
#elif defined(SDCARDDETECTINVERTED)
|
||||||
#error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
|
#error "SDCARDDETECTINVERTED is now SD_DETECT_STATE (HIGH). Please update your configuration."
|
||||||
|
#elif defined(SD_DETECT_INVERTED)
|
||||||
|
#error "SD_DETECT_INVERTED is now SD_DETECT_STATE (HIGH). Please update your configuration."
|
||||||
#elif defined(BTENABLED)
|
#elif defined(BTENABLED)
|
||||||
#error "BTENABLED is now BLUETOOTH. Please update your configuration."
|
#error "BTENABLED is now BLUETOOTH. Please update your configuration."
|
||||||
#elif defined(CUSTOM_MENDEL_NAME)
|
#elif defined(CUSTOM_MENDEL_NAME)
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
#error "Oops! Select 'FYSETC F6' in 'Tools > Board.'"
|
#error "Oops! Select 'FYSETC F6' in 'Tools > Board.'"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SD_DETECT_INVERTED)
|
|
||||||
//#error "SD_DETECT_INVERTED must be disabled for the FYSETC_F6_13 board."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BOARD_INFO_NAME
|
#ifndef BOARD_INFO_NAME
|
||||||
#define BOARD_INFO_NAME "FYSETC F6 1.3"
|
#define BOARD_INFO_NAME "FYSETC F6 1.3"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -276,7 +276,7 @@ private:
|
||||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
||||||
#define IS_SD_INSERTED() Sd2Card::isInserted()
|
#define IS_SD_INSERTED() Sd2Card::isInserted()
|
||||||
#elif PIN_EXISTS(SD_DETECT)
|
#elif PIN_EXISTS(SD_DETECT)
|
||||||
#define IS_SD_INSERTED() (READ(SD_DETECT_PIN) != ENABLED(SD_DETECT_INVERTED))
|
#define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == SD_DETECT_STATE)
|
||||||
#else
|
#else
|
||||||
// No card detect line? Assume the card is inserted.
|
// No card detect line? Assume the card is inserted.
|
||||||
#define IS_SD_INSERTED() true
|
#define IS_SD_INSERTED() true
|
||||||
|
|
Reference in a new issue