7static const char *
const TAG =
"ssd1331";
9static const uint16_t SSD1331_COLORMASK = 0xffff;
10static const uint8_t SSD1331_MAX_CONTRASTA = 0x91;
11static const uint8_t SSD1331_MAX_CONTRASTB = 0x50;
12static const uint8_t SSD1331_MAX_CONTRASTC = 0x7D;
13static const uint8_t SSD1331_BYTESPERPIXEL = 2;
15static const uint8_t SSD1331_DRAWLINE = 0x21;
16static const uint8_t SSD1331_DRAWRECT = 0x22;
17static const uint8_t SSD1331_FILL = 0x26;
18static const uint8_t SSD1331_SETCOLUMN = 0x15;
19static const uint8_t SSD1331_SETROW = 0x75;
20static const uint8_t SSD1331_CONTRASTA = 0x81;
21static const uint8_t SSD1331_CONTRASTB = 0x82;
22static const uint8_t SSD1331_CONTRASTC = 0x83;
23static const uint8_t SSD1331_MASTERCURRENT = 0x87;
24static const uint8_t SSD1331_SETREMAP = 0xA0;
25static const uint8_t SSD1331_STARTLINE = 0xA1;
26static const uint8_t SSD1331_DISPLAYOFFSET = 0xA2;
27static const uint8_t SSD1331_NORMALDISPLAY = 0xA4;
28static const uint8_t SSD1331_DISPLAYALLON = 0xA5;
29static const uint8_t SSD1331_DISPLAYALLOFF = 0xA6;
30static const uint8_t SSD1331_INVERTDISPLAY = 0xA7;
31static const uint8_t SSD1331_SETMULTIPLEX = 0xA8;
32static const uint8_t SSD1331_SETMASTER = 0xAD;
33static const uint8_t SSD1331_DISPLAYOFF = 0xAE;
34static const uint8_t SSD1331_DISPLAYON = 0xAF;
35static const uint8_t SSD1331_POWERMODE = 0xB0;
36static const uint8_t SSD1331_PRECHARGE = 0xB1;
37static const uint8_t SSD1331_CLOCKDIV = 0xB3;
38static const uint8_t SSD1331_PRECHARGEA = 0x8A;
39static const uint8_t SSD1331_PRECHARGEB = 0x8B;
40static const uint8_t SSD1331_PRECHARGEC = 0x8C;
41static const uint8_t SSD1331_PRECHARGELEVEL = 0xBB;
42static const uint8_t SSD1331_VCOMH = 0xBE;
47 this->
command(SSD1331_DISPLAYOFF);
48 this->
command(SSD1331_SETREMAP);
50 this->
command(SSD1331_STARTLINE);
52 this->
command(SSD1331_DISPLAYOFFSET);
54 this->
command(SSD1331_NORMALDISPLAY);
55 this->
command(SSD1331_SETMULTIPLEX);
57 this->
command(SSD1331_SETMASTER);
59 this->
command(SSD1331_POWERMODE);
61 this->
command(SSD1331_PRECHARGE);
63 this->
command(SSD1331_CLOCKDIV);
65 this->
command(SSD1331_PRECHARGEA);
67 this->
command(SSD1331_PRECHARGEB);
69 this->
command(SSD1331_PRECHARGEC);
71 this->
command(SSD1331_PRECHARGELEVEL);
75 this->
command(SSD1331_MASTERCURRENT);
83 this->
command(SSD1331_SETCOLUMN);
99 this->
command(SSD1331_CONTRASTA);
101 this->
command(SSD1331_CONTRASTB);
103 this->
command(SSD1331_CONTRASTC);
108 this->
command(SSD1331_DISPLAYON);
112 this->
command(SSD1331_DISPLAYOFF);
126 this->
buffer_[pos++] = (color565 >> 8) & 0xff;
132 Display::fill(color);
139 this->
buffer_[i] = color565 & 0xff;
141 this->
buffer_[i] = (color565 >> 8) & 0xff;