Add support for 64x48 SSD1306 OLED (#6740)

This commit is contained in:
Stephan Hadinger 2020-03-27 16:38:29 +01:00
parent 6f8026e394
commit aa0ace3763
2 changed files with 11 additions and 3 deletions

View File

@ -916,15 +916,22 @@ uint8_t *Adafruit_SSD1306::getBuffer(void) {
of graphics commands, as best needed by one's own application.
*/
void Adafruit_SSD1306::display(void) {
int16_t col_start = 0;
int16_t col_end = WIDTH - 1;
if ((64 == WIDTH) && (48 == HEIGHT)) { // for 64x48, we need to shift by 32 in both directions
col_start += 32;
col_end += 32;
}
TRANSACTION_START
static const uint8_t PROGMEM dlist1[] = {
SSD1306_PAGEADDR,
0, // Page start address
0xFF, // Page end (not really, but works here)
SSD1306_COLUMNADDR,
0 }; // Column start address
SSD1306_COLUMNADDR };
ssd1306_commandList(dlist1, sizeof(dlist1));
ssd1306_command1(WIDTH - 1); // Column end address
ssd1306_command1(col_start); // Column start address
ssd1306_command1(col_end); // Column end address
#if defined(ESP8266)
// ESP8266 needs a periodic yield() call to avoid watchdog reset.

View File

@ -8,6 +8,7 @@
- Add command ``ZbRestore`` to restore device configuration dumped with ``ZbStatus 2``
- Add support for unreachable (unplugged) Zigbee devices in Philips Hue emulation and Alexa
- Add Zigbee ``ZbUnbind``command
- Add support for 64x48 SSD1306 OLED (#6740)
## Released