7static const char *
const TAG =
"ssd1327";
9static const uint8_t SSD1327_MAX_CONTRAST = 127;
10static const uint8_t SSD1327_COLORMASK = 0x0f;
11static const uint8_t SSD1327_COLORSHIFT = 4;
12static const uint8_t SSD1327_PIXELSPERBYTE = 2;
14static const uint8_t SSD1327_SETCOLUMNADDRESS = 0x15;
15static const uint8_t SSD1327_SETROWADDRESS = 0x75;
16static const uint8_t SSD1327_SETCONTRAST = 0x81;
17static const uint8_t SSD1327_SETREMAP = 0xA0;
18static const uint8_t SSD1327_SETSTARTLINE = 0xA1;
19static const uint8_t SSD1327_SETOFFSET = 0xA2;
20static const uint8_t SSD1327_NORMALDISPLAY = 0xA4;
21static const uint8_t SSD1327_DISPLAYALLON = 0xA5;
22static const uint8_t SSD1327_DISPLAYALLOFF = 0xA6;
23static const uint8_t SSD1327_INVERTDISPLAY = 0xA7;
24static const uint8_t SSD1327_SETMULTIPLEX = 0xA8;
25static const uint8_t SSD1327_FUNCTIONSELECTIONA = 0xAB;
26static const uint8_t SSD1327_DISPLAYOFF = 0xAE;
27static const uint8_t SSD1327_DISPLAYON = 0xAF;
28static const uint8_t SSD1327_SETPHASELENGTH = 0xB1;
29static const uint8_t SSD1327_SETFRONTCLOCKDIVIDER = 0xB3;
30static const uint8_t SSD1327_SETGPIO = 0xB5;
31static const uint8_t SSD1327_SETSECONDPRECHARGEPERIOD = 0xB6;
32static const uint8_t SSD1327_SETGRAYSCALETABLE = 0xB8;
33static const uint8_t SSD1327_SELECTDEFAULTLINEARGRAYSCALETABLE = 0xB9;
34static const uint8_t SSD1327_SETPRECHARGEVOLTAGE = 0xBC;
35static const uint8_t SSD1327_SETVCOMHVOLTAGE = 0xBE;
36static const uint8_t SSD1327_FUNCTIONSELECTIONB = 0xD5;
37static const uint8_t SSD1327_SETCOMMANDLOCK = 0xFD;
38static const uint8_t SSD1327_HORIZONTALSCROLLRIGHTSETUP = 0x26;
39static const uint8_t SSD1327_HORIZONTALSCROLLLEFTSETUP = 0x27;
40static const uint8_t SSD1327_DEACTIVATESCROLL = 0x2E;
41static const uint8_t SSD1327_ACTIVATESCROLL = 0x2F;
47 this->
command(SSD1327_SETFRONTCLOCKDIVIDER);
49 this->
command(SSD1327_SETMULTIPLEX);
51 this->
command(SSD1327_SETOFFSET);
53 this->
command(SSD1327_SETSTARTLINE);
55 this->
command(SSD1327_SETREMAP);
57 this->
command(SSD1327_SETGRAYSCALETABLE);
74 this->
command(SSD1327_SETPHASELENGTH);
76 this->
command(SSD1327_SETVCOMHVOLTAGE);
80 this->
command(SSD1327_NORMALDISPLAY);
87 this->
command(SSD1327_SETCOLUMNADDRESS);
90 this->
command(SSD1327_SETROWADDRESS);
106 this->
command(SSD1327_SETCONTRAST);
111 this->
command(SSD1327_DISPLAYON);
115 this->
command(SSD1327_DISPLAYOFF);
143 uint8_t shift = (
x % SSD1327_PIXELSPERBYTE) * SSD1327_COLORSHIFT;
145 color4 = (color4 & SSD1327_COLORMASK) << shift;
147 this->
buffer_[
pos] &= (
static_cast<uint8_t
>(~SSD1327_COLORMASK) >> shift);
154 Display::fill(color);
159 uint8_t
fill = (color4 & SSD1327_COLORMASK) | ((color4 & SSD1327_COLORMASK) << SSD1327_COLORSHIFT);
178 return "SSD1327 128x128";