Skip to content

Commit

Permalink
Merge pull request #1 from mark9064/aod
Browse files Browse the repository at this point in the history
aod: lower lcd voltage
  • Loading branch information
KaffeinatedKat authored Oct 23, 2023
2 parents a306dca + 512ca38 commit 2543097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/drivers/St7789.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void St7789::Init() {
NormalModeOn();
SetVdv();
PowerControl();
GateControl();
DisplayOn();
}

Expand Down Expand Up @@ -153,6 +154,11 @@ void St7789::PowerControl() {
WriteData(0xb3);
}

void St7789::GateControl() {
WriteCommand(static_cast<uint8_t>(Commands::GateControl));
WriteData(0x00);
}

void St7789::SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
WriteCommand(static_cast<uint8_t>(Commands::ColumnAddressSet));
WriteData(x0 >> 8);
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/St7789.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace Pinetime {
void DisplayOn();
void DisplayOff();
void PowerControl();
void GateControl();

void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
void SetVdv();
Expand Down Expand Up @@ -79,6 +80,7 @@ namespace Pinetime {
PowerControl1 = 0xd0,
Command2Enable = 0xdf,
PowerControl2 = 0xe8,
GateControl = 0xb7,
};
void WriteData(uint8_t data);
void ColumnAddressSet();
Expand Down

0 comments on commit 2543097

Please sign in to comment.