Skip to content

Commit

Permalink
add support SSD1963 PWM backlight control. ( lovyan03#586 )
Browse files Browse the repository at this point in the history
  • Loading branch information
lovyan03 committed Jul 25, 2024
1 parent f38076b commit 48e87f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lgfx/v1/panel/Panel_SSD1963.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ namespace lgfx
return true;
}

void Panel_SSD1963::setBrightness(uint8_t brightness)
{
if (_light) { Panel_LCD::setBrightness(brightness); }
else {
uint8_t cmd[] = { 0xBE, 6, 0x05, brightness, 0x01, 0xFF, 0x00, 0x00, 0xFF, 0xFF };
command_list(cmd);
}
}

color_depth_t Panel_SSD1963::setColorDepth(color_depth_t depth)
{
uint8_t mode = 0x00;
Expand Down
2 changes: 2 additions & 0 deletions src/lgfx/v1/panel/Panel_SSD1963.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ namespace lgfx
_read_depth = rgb565_2Byte;
}

void setBrightness(uint8_t brightness) override;

void setHSync(uint_fast16_t front, uint_fast16_t sync, uint_fast16_t back, uint_fast16_t move = 0, uint_fast16_t lpspp = 0);
void setVSync(uint_fast16_t front, uint_fast16_t sync, uint_fast16_t back, uint_fast16_t move = 0);

Expand Down

0 comments on commit 48e87f6

Please sign in to comment.