From 0bcd7e000960d18db6d26813185fe0e2695bdfe6 Mon Sep 17 00:00:00 2001 From: John Crawford Date: Tue, 17 Oct 2023 08:19:01 -0600 Subject: aod: lower voltage going to the display --- src/drivers/St7789.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/drivers/St7789.cpp') diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index 035d61c9..48b65acb 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -27,6 +27,7 @@ void St7789::Init() { #endif NormalModeOn(); SetVdv(); + PowerControl(); DisplayOn(); } @@ -176,6 +177,19 @@ void St7789::DisplayOn() { WriteCommand(static_cast(Commands::DisplayOn)); } +void St7789::PowerControl() { + WriteCommand(static_cast(Commands::PowerControl1)); + constexpr uint8_t args[] = { + 0xa4, // Constant + 0x00, // Lowest possible voltages + }; + WriteData(args, sizeof(args)); + + WriteCommand(static_cast(Commands::PowerControl2)); + // Lowest possible boost circuit clocks + WriteData(0xb3); +} + void St7789::SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) { WriteCommand(static_cast(Commands::ColumnAddressSet)); uint8_t colArgs[] = { -- cgit v1.2.3-70-g09d2