Skip to content

Commit d325a99

Browse files
committed
2.13 color hi res
1 parent f647376 commit d325a99

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/Adafruit_ThinkInk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ typedef enum {
66

77
#include "panels/ThinkInk_154_Tricolor_Z17.h"
88
#include "panels/ThinkInk_213_Tricolor_Z16.h"
9+
#include "panels/ThinkInk_213_Tricolor_RH.h"
910
#include "panels/ThinkInk_270_Tricolor_C44.h"
1011
#include "panels/ThinkInk_290_Tricolor_Z10.h"
1112

src/panels/ThinkInk_213_Tricolor_RH.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#ifndef _THINKINK_213_TRICOLOR_RH_H
2+
#define _THINKINK_213_TRICOLOR_RH_H
3+
4+
#include "Adafruit_EPD.h"
5+
6+
class ThinkInk_213_Tricolor_RH : public Adafruit_SSD1680 {
7+
private:
8+
public:
9+
ThinkInk_213_Tricolor_RH(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST,
10+
int8_t CS, int8_t SRCS, int8_t MISO, int8_t BUSY = -1)
11+
: Adafruit_SSD1680(250, 122, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY){};
12+
13+
ThinkInk_213_Tricolor_RH(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
14+
int8_t BUSY = -1, SPIClass *spi = &SPI)
15+
: Adafruit_SSD1680(250, 122, DC, RST, CS, SRCS, BUSY, spi){};
16+
17+
void begin(thinkinkmode_t mode = THINKINK_MONO) {
18+
Adafruit_EPD::begin(true);
19+
setBlackBuffer(0, true);
20+
setColorBuffer(1, false);
21+
22+
layer_colors[EPD_WHITE] = 0b00;
23+
layer_colors[EPD_BLACK] = 0b01;
24+
layer_colors[EPD_RED] = 0b10;
25+
layer_colors[EPD_GRAY] = 0b10;
26+
layer_colors[EPD_LIGHT] = 0b00;
27+
layer_colors[EPD_DARK] = 0b01;
28+
29+
default_refresh_delay = 13000;
30+
setRotation(0);
31+
powerDown();
32+
};
33+
};
34+
35+
#endif // _THINKINK_213_TRI

0 commit comments

Comments
 (0)