aod: lower lcd voltage

This commit is contained in:
mark9064 2023-10-23 22:22:46 +01:00 committed by JF
parent 0bcd7e0009
commit da9ab4a7b4
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ void St7789::Init() {
NormalModeOn(); NormalModeOn();
SetVdv(); SetVdv();
PowerControl(); PowerControl();
GateControl();
DisplayOn(); DisplayOn();
} }
@ -190,6 +191,12 @@ void St7789::PowerControl() {
WriteData(0xb3); WriteData(0xb3);
} }
void St7789::GateControl() {
WriteCommand(static_cast<uint8_t>(Commands::GateControl));
// Lowest possible VGL/VGH
WriteData(0x00);
}
void St7789::SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { void St7789::SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
WriteCommand(static_cast<uint8_t>(Commands::ColumnAddressSet)); WriteCommand(static_cast<uint8_t>(Commands::ColumnAddressSet));
uint8_t colArgs[] = { uint8_t colArgs[] = {

View File

@ -55,6 +55,7 @@ namespace Pinetime {
void DisplayOn(); void DisplayOn();
void DisplayOff(); void DisplayOff();
void PowerControl(); void PowerControl();
void GateControl();
void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
void SetVdv(); void SetVdv();
@ -84,6 +85,7 @@ namespace Pinetime {
Command2Enable = 0xdf, Command2Enable = 0xdf,
PowerControl1 = 0xd0, PowerControl1 = 0xd0,
PowerControl2 = 0xe8, PowerControl2 = 0xe8,
GateControl = 0xb7,
}; };
void WriteData(uint8_t data); void WriteData(uint8_t data);
void WriteData(const uint8_t* data, size_t size); void WriteData(const uint8_t* data, size_t size);