-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new ssd1680 panel without offset 🤷
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef _THINKINK_213_MONO_GDEY0213B74_H | ||
#define _THINKINK_213_MONO_GDEY0213B74_H | ||
|
||
// This file is #included by Adafruit_ThinkInk.h and does not need to | ||
// #include anything else to pick up the EPD header or ink mode enum. | ||
|
||
class ThinkInk_213_Mono_GDEY0213B74 : public Adafruit_SSD1680 { | ||
public: | ||
ThinkInk_213_Mono_GDEY0213B74(int16_t SID, int16_t SCLK, int16_t DC, int16_t RST, | ||
int16_t CS, int16_t SRCS, int16_t MISO, | ||
int16_t BUSY = -1) | ||
: Adafruit_SSD1680(250, 122, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){}; | ||
|
||
ThinkInk_213_Mono_GDEY0213B74(int16_t DC, int16_t RST, int16_t CS, int16_t SRCS, | ||
int16_t BUSY = -1, SPIClass *spi = &SPI) | ||
: Adafruit_SSD1680(250, 122, DC, RST, CS, SRCS, BUSY, spi){}; | ||
|
||
void begin(thinkinkmode_t mode = THINKINK_MONO) { | ||
_xram_offset = 0; | ||
|
||
Adafruit_SSD1680::begin(true); | ||
setColorBuffer(0, true); // layer 0 uninverted | ||
setBlackBuffer(0, true); // only one buffer | ||
|
||
inkmode = mode; // Preserve ink mode for ImageReader or others | ||
|
||
layer_colors[EPD_WHITE] = 0b00; | ||
layer_colors[EPD_BLACK] = 0b01; | ||
layer_colors[EPD_RED] = 0b01; | ||
layer_colors[EPD_GRAY] = 0b01; | ||
layer_colors[EPD_LIGHT] = 0b00; | ||
layer_colors[EPD_DARK] = 0b01; | ||
|
||
default_refresh_delay = 1000; | ||
setRotation(0); | ||
powerDown(); | ||
} | ||
}; | ||
|
||
#endif // _THINKINK_213_MONO_GDEY0213B74_H |