7static const char *
const TAG =
"ssd1351";
9static const uint16_t SSD1351_COLORMASK = 0xffff;
10static const uint8_t SSD1351_MAX_CONTRAST = 15;
11static const uint8_t SSD1351_BYTESPERPIXEL = 2;
13static const uint8_t SSD1351_SETCOLUMN = 0x15;
14static const uint8_t SSD1351_SETROW = 0x75;
15static const uint8_t SSD1351_SETREMAP = 0xA0;
16static const uint8_t SSD1351_STARTLINE = 0xA1;
17static const uint8_t SSD1351_DISPLAYOFFSET = 0xA2;
18static const uint8_t SSD1351_DISPLAYOFF = 0xAE;
19static const uint8_t SSD1351_DISPLAYON = 0xAF;
20static const uint8_t SSD1351_PRECHARGE = 0xB1;
21static const uint8_t SSD1351_CLOCKDIV = 0xB3;
22static const uint8_t SSD1351_PRECHARGELEVEL = 0xBB;
23static const uint8_t SSD1351_VCOMH = 0xBE;
25static const uint8_t SSD1351_DISPLAYALLOFF = 0xA4;
26static const uint8_t SSD1351_DISPLAYALLON = 0xA5;
27static const uint8_t SSD1351_NORMALDISPLAY = 0xA6;
28static const uint8_t SSD1351_INVERTDISPLAY = 0xA7;
30static const uint8_t SSD1351_CONTRASTABC = 0xC1;
31static const uint8_t SSD1351_CONTRASTMASTER = 0xC7;
33static const uint8_t SSD1351_WRITERAM = 0x5C;
34static const uint8_t SSD1351_READRAM = 0x5D;
36static const uint8_t SSD1351_FUNCTIONSELECT = 0xAB;
37static const uint8_t SSD1351_DISPLAYENHANCE = 0xB2;
38static const uint8_t SSD1351_SETVSL = 0xB4;
39static const uint8_t SSD1351_SETGPIO = 0xB5;
40static const uint8_t SSD1351_PRECHARGE2 = 0xB6;
41static const uint8_t SSD1351_SETGRAY = 0xB8;
42static const uint8_t SSD1351_USELUT = 0xB9;
43static const uint8_t SSD1351_MUXRATIO = 0xCA;
44static const uint8_t SSD1351_COMMANDLOCK = 0xFD;
45static const uint8_t SSD1351_HORIZSCROLL = 0x96;
46static const uint8_t SSD1351_STOPSCROLL = 0x9E;
47static const uint8_t SSD1351_STARTSCROLL = 0x9F;
52 this->
command(SSD1351_COMMANDLOCK);
54 this->
command(SSD1351_COMMANDLOCK);
56 this->
command(SSD1351_DISPLAYOFF);
57 this->
command(SSD1351_CLOCKDIV);
59 this->
command(SSD1351_MUXRATIO);
61 this->
command(SSD1351_DISPLAYOFFSET);
65 this->
command(SSD1351_FUNCTIONSELECT);
67 this->
command(SSD1351_PRECHARGE);
71 this->
command(SSD1351_NORMALDISPLAY);
76 this->
command(SSD1351_PRECHARGE2);
78 this->
command(SSD1351_SETREMAP);
80 this->
command(SSD1351_STARTLINE);
82 this->
command(SSD1351_CONTRASTABC);
92 this->
command(SSD1351_SETCOLUMN);
98 this->
command(SSD1351_WRITERAM);
107 if (brightness > 1) {
109 }
else if (brightness < 0) {
118 this->
command(SSD1351_CONTRASTMASTER);
123 this->
command(SSD1351_DISPLAYON);
127 this->
command(SSD1351_DISPLAYOFF);
158 this->
buffer_[pos++] = (color565 >> 8) & 0xff;
164 Display::fill(color);
171 this->
buffer_[i] = color565 & 0xff;
173 this->
buffer_[i] = (color565 >> 8) & 0xff;
192 return "SSD1351 128x96";
194 return "SSD1351 128x128";