Clean up LCD conditionals, DWIN

This commit is contained in:
Scott Lahteine
2020-09-06 21:40:58 -05:00
parent b709baba7a
commit a445746a8b
35 changed files with 253 additions and 169 deletions

View File

@@ -312,16 +312,18 @@ public:
static void media_changed(const uint8_t old_stat, const uint8_t stat);
#endif
#if ENABLED(DWIN_CREALITY_LCD)
static void refresh();
#else
FORCE_INLINE static void refresh() {
TERN_(HAS_SPI_LCD, refresh(LCDVIEW_CLEAR_CALL_REDRAW));
}
#endif
#if HAS_SPI_LCD
static bool detected();
static void init_lcd();
FORCE_INLINE static void refresh() { refresh(LCDVIEW_CLEAR_CALL_REDRAW); }
#else
#if ENABLED(DWIN_CREALITY_LCD)
static void refresh();
#else
static inline void refresh() {}
#endif
static inline bool detected() { return true; }
static inline void init_lcd() {}
#endif
@@ -403,14 +405,10 @@ public:
#if HAS_GRAPHICAL_LCD
static bool drawing_screen, first_page;
static void set_font(const MarlinFont font_nr);
#else
static constexpr bool drawing_screen = false, first_page = true;
static void set_custom_characters(const HD44780CharSet screen_charset=CHARSET_INFO);
#if ENABLED(LCD_PROGRESS_BAR)
@@ -460,6 +458,12 @@ public:
#endif
#if HAS_GRAPHICAL_LCD
static bool drawing_screen, first_page;
#else
static constexpr bool drawing_screen = false, first_page = true;
#endif
static bool get_blink();
static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component);
static void draw_kill_screen();