diff --git a/Marlin/src/core/enum.h b/Marlin/src/core/enum.h index d9a3cd18c2..bf30f7b628 100644 --- a/Marlin/src/core/enum.h +++ b/Marlin/src/core/enum.h @@ -69,20 +69,4 @@ typedef enum { TEMPUNIT_F } TempUnit; -/** - * SD Card - */ -enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename }; - -/** - * Ultra LCD - */ -enum LCDViewAction : char { - LCDVIEW_NONE, - LCDVIEW_REDRAW_NOW, - LCDVIEW_CALL_REDRAW_NEXT, - LCDVIEW_CLEAR_CALL_REDRAW, - LCDVIEW_CALL_NO_REDRAW -}; - #endif // __ENUM_H__ diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 97632e8cd4..c6409ad07c 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -117,10 +117,9 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed // The main status screen void lcd_status_screen(); -millis_t next_lcd_update_ms; - -uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) +LCDViewAction lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; uint16_t max_display_update_time = 0; +millis_t next_lcd_update_ms; #if ENABLED(ULTIPANEL) diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 05376cd2ce..0468dcdfdd 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -57,7 +57,15 @@ void lcd_kill_screen(); void kill_screen(PGM_P lcd_msg); - extern uint8_t lcdDrawUpdate; + enum LCDViewAction : uint8_t { + LCDVIEW_NONE, + LCDVIEW_REDRAW_NOW, + LCDVIEW_CALL_REDRAW_NEXT, + LCDVIEW_CLEAR_CALL_REDRAW, + LCDVIEW_CALL_NO_REDRAW + }; + + extern LCDViewAction lcdDrawUpdate; inline void lcd_refresh() { lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; } #if HAS_BUZZER diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 8e29bd9a6f..1e2f685fcf 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -33,6 +33,8 @@ #include "SdFile.h" +enum LsAction : uint8_t { LS_SerialPrint, LS_Count, LS_GetFilename }; + class CardReader { public: CardReader();