Skip to content

Commit

Permalink
Add SSD1306 64x48 pixel support
Browse files Browse the repository at this point in the history
Add SSD1306 64x48 pixel support (#6740)
  • Loading branch information
arendst committed Oct 30, 2019
1 parent 4e71477 commit 3cd8bc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,13 @@ boolean Adafruit_SSD1306::begin(uint8_t vcs, uint8_t addr, boolean reset,
SSD1306_SETCONTRAST }; // 0x81
ssd1306_commandList(init4c, sizeof(init4c));
ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x10 : 0xAF);
} else if((WIDTH == 64) && (HEIGHT == 48)) {
static const uint8_t PROGMEM init4d[] = {
SSD1306_SETCOMPINS, // 0xDA
0x12,
SSD1306_SETCONTRAST }; // 0x81
ssd1306_commandList(init4d, sizeof(init4d));
ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF);
} else {
// Other screen varieties -- TBD
}
Expand Down
4 changes: 2 additions & 2 deletions tasmota/xdsp_02_ssd1306.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ void SSD1306InitDriver()

if (XDSP_02 == Settings.display_model) {

if ((Settings.display_width != 96) && (Settings.display_width != 128)) {
if ((Settings.display_width != 64) && (Settings.display_width != 96) && (Settings.display_width != 128)) {
Settings.display_width = 128;
}
if ((Settings.display_height != 16) && (Settings.display_height != 32) && (Settings.display_height != 64)) {
if ((Settings.display_height != 16) && (Settings.display_height != 32) && (Settings.display_height != 48) && (Settings.display_height != 64)) {
Settings.display_height = 64;
}

Expand Down

0 comments on commit 3cd8bc2

Please sign in to comment.