Skip to content

Commit da9ab4a

Browse files
mark9064JF002
authored andcommitted
aod: lower lcd voltage
1 parent 0bcd7e0 commit da9ab4a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/drivers/St7789.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ void St7789::Init() {
2828
NormalModeOn();
2929
SetVdv();
3030
PowerControl();
31+
GateControl();
3132
DisplayOn();
3233
}
3334

@@ -190,6 +191,12 @@ void St7789::PowerControl() {
190191
WriteData(0xb3);
191192
}
192193

194+
void St7789::GateControl() {
195+
WriteCommand(static_cast<uint8_t>(Commands::GateControl));
196+
// Lowest possible VGL/VGH
197+
WriteData(0x00);
198+
}
199+
193200
void St7789::SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
194201
WriteCommand(static_cast<uint8_t>(Commands::ColumnAddressSet));
195202
uint8_t colArgs[] = {

src/drivers/St7789.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ namespace Pinetime {
5555
void DisplayOn();
5656
void DisplayOff();
5757
void PowerControl();
58+
void GateControl();
5859

5960
void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
6061
void SetVdv();
@@ -84,6 +85,7 @@ namespace Pinetime {
8485
Command2Enable = 0xdf,
8586
PowerControl1 = 0xd0,
8687
PowerControl2 = 0xe8,
88+
GateControl = 0xb7,
8789
};
8890
void WriteData(uint8_t data);
8991
void WriteData(const uint8_t* data, size_t size);

0 commit comments

Comments
 (0)