mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
drivers/display/ssd1306.py: Change the SET_COM_PIN_CFG setting.
Making it more specific to use 0x02 for display with an aspect ratio > 2 (resolutions 96x16 and 128x32) and 0x12 for all other sizes as recommended by @mcauser. Tested with a 64x32 display which did not work before.
This commit is contained in:
@@ -50,7 +50,7 @@ class SSD1306(framebuf.FrameBuffer):
|
||||
SET_DISP_OFFSET,
|
||||
0x00,
|
||||
SET_COM_PIN_CFG,
|
||||
0x02 if self.height == 32 else 0x12,
|
||||
0x02 if self.width > 2 * self.height else 0x12,
|
||||
# timing and driving scheme
|
||||
SET_DISP_CLK_DIV,
|
||||
0x80,
|
||||
|
||||
Reference in New Issue
Block a user