Permit disable REINIT_NOISY_LCD (#28273)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Reimnop
2026-01-14 05:28:16 +07:00
committed by GitHub
parent c1e01eee35
commit 2048e8b173
3 changed files with 18 additions and 5 deletions

View File

@@ -1782,6 +1782,12 @@
*/
//#define SD_SPI_SPEED SPI_HALF_SPEED
/**
* Reinit the LCD after SD Card insert/remove or when entering the menu.
* Required for some LCDs that use shared SPI with an external SD Card reader.
*/
#define REINIT_NOISY_LCD
// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
//#define SD_DETECT_STATE HIGH

View File

@@ -605,11 +605,9 @@
#endif
#endif
#if HAS_SD_DETECT && NONE(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI, HAS_DWIN_E3V2, HAS_U8GLIB_I2C_OLED)
#define REINIT_NOISY_LCD 1 // Have the LCD re-init on SD insertion
#endif
#endif // HAS_MEDIA
#else // !HAS_MEDIA
#undef REINIT_NOISY_LCD
#endif
/**
* Power Supply

View File

@@ -993,3 +993,12 @@
#if ALL(SMOOTH_LIN_ADVANCE, MIXING_EXTRUDER)
#warning "SMOOTH_LIN_ADVANCE with MIXING_EXTRUDER is untested. Use with caution."
#endif
/**
* Some LCDs need re-init to deal with flaky SPI bus sharing
*/
#if HAS_SD_DETECT && NONE(REINIT_NOISY_LCD, HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI, HAS_DWIN_E3V2, HAS_U8GLIB_I2C_OLED)
#warning "It is recommended to enable REINIT_NOISY_LCD with your LCD controller model."
#elif ENABLED(REINIT_NOISY_LCD)
#warning "REINIT_NOISY_LCD is probably not required with your LCD controller model."
#endif