@@ -599,6 +599,9 @@ bool Adafruit_SSD1306::begin(uint8_t vcs, uint8_t addr, bool reset,
599599 } else if ((WIDTH == 96 ) && (HEIGHT == 16 )) {
600600 comPins = 0x2 ; // ada x12
601601 contrast = (vccstate == SSD1306_EXTERNALVCC) ? 0x10 : 0xAF ;
602+ } else if ((WIDTH == 64 ) && (HEIGHT == 32 )) {
603+ comPins = 0x12 ; // ada x12
604+ contrast = (vccstate == SSD1306_EXTERNALVCC) ? 0x10 : 0xCF ;
602605 } else {
603606 // Other screen varieties -- TBD
604607 }
@@ -997,11 +1000,18 @@ void Adafruit_SSD1306::display(void) {
9971000 TRANSACTION_START
9981001 static const uint8_t PROGMEM dlist1[] = {
9991002 SSD1306_PAGEADDR,
1000- 0 , // Page start address
1001- 0xFF , // Page end (not really, but works here)
1002- SSD1306_COLUMNADDR, 0 }; // Column start address
1003+ 0 , // Page start address
1004+ 0xFF , // Page end (not really, but works here)
1005+ SSD1306_COLUMNADDR}; // Column start address
10031006 ssd1306_commandList (dlist1, sizeof (dlist1));
1004- ssd1306_command1 (WIDTH - 1 ); // Column end address
1007+
1008+ if (WIDTH == 64 ) {
1009+ ssd1306_command1 (0x20 ); // Column start
1010+ ssd1306_command1 (0x20 + WIDTH - 1 ); // Column end address
1011+ } else {
1012+ ssd1306_command1 (0 ); // Column start
1013+ ssd1306_command1 ((WIDTH - 1 )); // Column end address
1014+ }
10051015
10061016#if defined(ESP8266)
10071017 // ESP8266 needs a periodic yield() call to avoid watchdog reset.
0 commit comments