InfiniTime.git

commit da9ab4a7b44b3daed233d876f50c245ee4ee4229

Author: mark9064 <30447455+mark9064@users.noreply.github.com>

aod: lower lcd voltage

 src/drivers/St7789.cpp | 7 +++++++
 src/drivers/St7789.h | 2 ++


diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index 48b65acbd2a916bfb43e770daa148330cfcb2c1c..cdfa6a346739fc6b02ace33ab932177b72fafd0e 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -28,6 +28,7 @@ #endif
   NormalModeOn();
   SetVdv();
   PowerControl();
+  GateControl();
   DisplayOn();
 }
 
@@ -188,6 +189,12 @@
   WriteCommand(static_cast<uint8_t>(Commands::PowerControl2));
   // Lowest possible boost circuit clocks
   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) {




diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h
index 68e9f0582753a4e7cc5f080c1e10da3f74400f53..96d16b93c14784a5f1be4b7f870983a4a500afc5 100644
--- a/src/drivers/St7789.h
+++ b/src/drivers/St7789.h
@@ -55,6 +55,7 @@       void FrameRateLow();
       void DisplayOn();
       void DisplayOff();
       void PowerControl();
+      void GateControl();
 
       void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
       void SetVdv();
@@ -84,6 +85,7 @@         VdvSet = 0xc4,
         Command2Enable = 0xdf,
         PowerControl1 = 0xd0,
         PowerControl2 = 0xe8,
+        GateControl = 0xb7,
       };
       void WriteData(uint8_t data);
       void WriteData(const uint8_t* data, size_t size);