7static const char *
const TAG =
"ssd1325";
9static const uint8_t SSD1325_MAX_CONTRAST = 127;
10static const uint8_t SSD1325_COLORMASK = 0x0f;
11static const uint8_t SSD1325_COLORSHIFT = 4;
12static const uint8_t SSD1325_PIXELSPERBYTE = 2;
14static const uint8_t SSD1325_SETCOLADDR = 0x15;
15static const uint8_t SSD1325_SETROWADDR = 0x75;
16static const uint8_t SSD1325_SETCONTRAST = 0x81;
17static const uint8_t SSD1325_SETCURRENT = 0x84;
19static const uint8_t SSD1325_SETREMAP = 0xA0;
20static const uint8_t SSD1325_SETSTARTLINE = 0xA1;
21static const uint8_t SSD1325_SETOFFSET = 0xA2;
22static const uint8_t SSD1325_NORMALDISPLAY = 0xA4;
23static const uint8_t SSD1325_DISPLAYALLON = 0xA5;
24static const uint8_t SSD1325_DISPLAYALLOFF = 0xA6;
25static const uint8_t SSD1325_INVERTDISPLAY = 0xA7;
26static const uint8_t SSD1325_SETMULTIPLEX = 0xA8;
27static const uint8_t SSD1325_MASTERCONFIG = 0xAD;
28static const uint8_t SSD1325_DISPLAYOFF = 0xAE;
29static const uint8_t SSD1325_DISPLAYON = 0xAF;
31static const uint8_t SSD1325_SETPRECHARGECOMPENABLE = 0xB0;
32static const uint8_t SSD1325_SETPHASELEN = 0xB1;
33static const uint8_t SSD1325_SETROWPERIOD = 0xB2;
34static const uint8_t SSD1325_SETCLOCK = 0xB3;
35static const uint8_t SSD1325_SETPRECHARGECOMP = 0xB4;
36static const uint8_t SSD1325_SETGRAYTABLE = 0xB8;
37static const uint8_t SSD1325_SETDEFAULTGRAYTABLE = 0xB9;
38static const uint8_t SSD1325_SETPRECHARGEVOLTAGE = 0xBC;
39static const uint8_t SSD1325_SETVCOMLEVEL = 0xBE;
40static const uint8_t SSD1325_SETVSL = 0xBF;
42static const uint8_t SSD1325_GFXACCEL = 0x23;
43static const uint8_t SSD1325_DRAWRECT = 0x24;
44static const uint8_t SSD1325_COPY = 0x25;
49 this->
command(SSD1325_DISPLAYOFF);
50 this->
command(SSD1325_SETCLOCK);
52 this->
command(SSD1325_SETMULTIPLEX);
58 this->
command(SSD1325_SETOFFSET);
64 this->
command(SSD1325_SETSTARTLINE);
66 this->
command(SSD1325_MASTERCONFIG);
68 this->
command(SSD1325_SETREMAP);
74 this->
command(SSD1325_SETCURRENT + 0x2);
75 this->
command(SSD1325_SETGRAYTABLE);
103 this->
command(SSD1325_SETROWPERIOD);
105 this->
command(SSD1325_SETPHASELEN);
107 this->
command(SSD1325_SETPRECHARGECOMP);
109 this->
command(SSD1325_SETPRECHARGECOMPENABLE);
111 this->
command(SSD1325_SETVCOMLEVEL);
115 this->
command(SSD1325_NORMALDISPLAY);
122 this->
command(SSD1325_SETCOLADDR);
125 this->
command(SSD1325_SETROWADDR);
141 if (brightness > 1) {
143 }
else if (brightness < 0) {
149 this->
command(SSD1325_SETCONTRAST);
154 this->
command(SSD1325_DISPLAYON);
158 this->
command(SSD1325_DISPLAYOFF);
200 uint8_t shift = (
x % SSD1325_PIXELSPERBYTE) * SSD1325_COLORSHIFT;
202 color4 = (color4 & SSD1325_COLORMASK) << shift;
204 this->
buffer_[
pos] &= (
static_cast<uint8_t
>(~SSD1325_COLORMASK) >> shift);
210 uint8_t
fill = (color4 & SSD1325_COLORMASK) | ((color4 & SSD1325_COLORMASK) << SSD1325_COLORSHIFT);
229 return "SSD1325 128x32";
231 return "SSD1325 128x64";
233 return "SSD1325 96x16";
235 return "SSD1325 64x48";
237 return "SSD1327 128x128";