🚸 TFT backlight PWM / brightness (#22841)
This commit is contained in:
committed by
Scott Lahteine
parent
34c9f64925
commit
064f91e9b0
@@ -338,6 +338,15 @@ void MarlinUI::draw_kill_screen() {
|
||||
|
||||
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
void MarlinUI::_set_brightness() {
|
||||
#if PIN_EXISTS(TFT_BACKLIGHT)
|
||||
if (PWM_PIN(TFT_BACKLIGHT_PIN))
|
||||
analogWrite(pin_t(TFT_BACKLIGHT_PIN), brightness);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
|
||||
#include "../menu/menu.h"
|
||||
|
Reference in New Issue
Block a user