🐛 E3V2 Brightness followup (#22821)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
committed by
GitHub
parent
a7fdaabd54
commit
1ac7a56a82
@@ -78,14 +78,16 @@ bool DWIN_Handshake() {
|
||||
&& databuf[3] == 'K' );
|
||||
}
|
||||
|
||||
// Set the backlight brightness
|
||||
// brightness: (0x00-0x1F)
|
||||
void DWIN_LCD_Brightness(const uint8_t brightness) {
|
||||
size_t i = 0;
|
||||
DWIN_Byte(i, 0x30);
|
||||
DWIN_Byte(i, _MAX(brightness, 0x1F));
|
||||
DWIN_Send(i);
|
||||
}
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
// Set LCD backlight (from DWIN Enhanced)
|
||||
// brightness: 0x00-0xFF
|
||||
void DWIN_LCD_Brightness(const uint8_t brightness) {
|
||||
size_t i = 0;
|
||||
DWIN_Byte(i, 0x30);
|
||||
DWIN_Byte(i, brightness);
|
||||
DWIN_Send(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set screen display direction
|
||||
// dir: 0=0°, 1=90°, 2=180°, 3=270°
|
||||
|
||||
Reference in New Issue
Block a user