• Mike Causer's avatar
    drivers/display/ssd1306.py: Add support for 72x40 displays. · bc7822d8
    Mike Causer authored
    The 72x40 OLED requires selecting the internal IREF, as opposed to the
    default external IREF.  This is an undocumented feature in the SSD1306
    datasheet, but is present in the SSD1315 datasheet.  It's possible the
    72x40 OLED is actually using the newer SSD1315 controller.  Sending the
    IREF select command to SSD1306 displays has no effect on them, so it's
    added to the init_display() instead of wrapping in an "if width = 72".
    
    Also tested on a 128x64 OLED using the SSD1315 controller (smaller ribbon
    cable) and the proposed change has no effect on the display, as the module
    comes with the correct current limiting resistor.  Internal and external
    IREF work the same.
    
    Fixes issue #7281.
    bc7822d8
ssd1306.py 4.81 KB