diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-07-17 21:16:57 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-07-17 21:16:57 (GMT) |
| commit | 59cc1abf5fd977e21f7bc45292ce03e40cd37820 (patch) | |
| tree | 688f6bd77ca9f2659ee02ba896e288c9bf6129d9 /src/drivers | |
| parent | 4f117765d8610d62c32f07f5e967aad3031c88e4 (diff) | |
Revert "Fix large blacklevel step. Lower 25% of shades are now accessible."
This reverts commit 8061822f0cba9caa9d957b85a8284ab3120aaf3e.
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/St7789.cpp | 10 | ||||
| -rw-r--r-- | src/drivers/St7789.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index 3ed1beb..d520199 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -23,7 +23,7 @@ void St7789::Init() { RowAddressSet(); DisplayInversionOn(); NormalModeOn(); - SetVdv(); + SetGamma(); DisplayOn(); } @@ -115,11 +115,9 @@ void St7789::WriteToRam() { WriteCommand(static_cast<uint8_t>(Commands::WriteToRam)); } -void St7789::SetVdv() { - // By default there is a large step from pixel brightness zero to one. - // After experimenting with VCOMS, VRH and VDV, this was found to produce good results. - WriteCommand(static_cast<uint8_t>(Commands::VdvSet)); - WriteData(0x10); +void St7789::SetGamma() { + WriteCommand(static_cast<uint8_t>(Commands::GammaSet)); + WriteData(0x04); } void St7789::DisplayOff() { diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h index 8c2ac09..044fc81 100644 --- a/src/drivers/St7789.h +++ b/src/drivers/St7789.h @@ -43,7 +43,7 @@ namespace Pinetime { void DisplayOff(); void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); - void SetVdv(); + void SetGamma(); void WriteCommand(uint8_t cmd); void WriteSpi(const uint8_t* data, size_t size); @@ -53,6 +53,7 @@ namespace Pinetime { SleepOut = 0x11, NormalModeOn = 0x13, DisplayInversionOn = 0x21, + GammaSet = 0x26, DisplayOff = 0x28, DisplayOn = 0x29, ColumnAddressSet = 0x2a, @@ -62,7 +63,6 @@ namespace Pinetime { VerticalScrollDefinition = 0x33, VerticalScrollStartAddress = 0x37, ColMod = 0x3a, - VdvSet = 0xc4, }; void WriteData(uint8_t data); void ColumnAddressSet(); |
