M256 LCD brightness (#22478)

This commit is contained in:
Scott Lahteine
2021-08-01 14:28:53 -05:00
committed by GitHub
parent 7110c4562e
commit 1e33c1a2a7
10 changed files with 114 additions and 13 deletions

View File

@@ -239,6 +239,22 @@ public:
static void media_changed(const uint8_t old_stat, const uint8_t stat);
#endif
#if HAS_LCD_BRIGHTNESS
#ifndef MIN_LCD_BRIGHTNESS
#define MIN_LCD_BRIGHTNESS 1
#endif
#ifndef MAX_LCD_BRIGHTNESS
#define MAX_LCD_BRIGHTNESS 255
#endif
#ifndef DEFAULT_LCD_BRIGHTNESS
#define DEFAULT_LCD_BRIGHTNESS MAX_LCD_BRIGHTNESS
#endif
static uint8_t brightness;
static bool backlight;
static void set_brightness(const uint8_t value);
FORCE_INLINE static void refresh_brightness() { set_brightness(brightness); }
#endif
#if ENABLED(DWIN_CREALITY_LCD)
static void refresh();
#else