From 6b9a1420bfdf2ecbe77ebe965602746cc1ff1d6f Mon Sep 17 00:00:00 2001 From: philippe44 Date: Tue, 11 Feb 2020 21:49:43 -0800 Subject: [PATCH] 32 pixel height display bug --- components/display/tarablessd13x6/ssd13x6.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/display/tarablessd13x6/ssd13x6.c b/components/display/tarablessd13x6/ssd13x6.c index 9b758202..ea1a0836 100644 --- a/components/display/tarablessd13x6/ssd13x6.c +++ b/components/display/tarablessd13x6/ssd13x6.c @@ -230,9 +230,9 @@ static bool SSD13x6_Init( struct SSD13x6_Device* DeviceHandle, int Width, int He SSD13x6_WriteCommand( DeviceHandle, 0x8D ); SSD13x6_WriteCommand( DeviceHandle, 0x14 ); - // COM pins HW config (alternative:EN, remap:DIS) - some display might need something difference + // COM pins HW config (alternative:EN if 64, DIS if 32, remap:DIS) - some display might need something difference SSD13x6_WriteCommand( DeviceHandle, 0xDA ); - SSD13x6_WriteCommand( DeviceHandle, (1 << 4) | (0 < 5) ); + SSD13x6_WriteCommand( DeviceHandle, ((Height == 64 ? 1 : 0) << 4) | (0 < 5) ); } else { // charge pump regulator, do direct init @@ -256,9 +256,6 @@ static bool SSD13x6_Init( struct SSD13x6_Device* DeviceHandle, int Width, int He // no gray scale DeviceHandle->ReMap |= 0x10; SSD132x_ReMap( DeviceHandle ); - - SSD13x6_SetHFlip( DeviceHandle, false ); - SSD13x6_SetVFlip( DeviceHandle, false ); } SSD13x6_SetMuxRatio( DeviceHandle, Height - 1 );