mirror of https://github.com/arendst/Tasmota.git
Add SSD1306 64x48 pixel support
Add SSD1306 64x48 pixel support (#6740)
This commit is contained in:
parent
4e7147708b
commit
3cd8bc2545
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue