Skip to content

Commit 9e497c5

Browse files
committed
fix 2.9" tricolor
1 parent 6593a1f commit 9e497c5

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/panels/ThinkInk_270_Tricolor_C44.h

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33

44
#include "Adafruit_EPD.h"
55

6+
// clang-format off
7+
8+
static const uint8_t ti_270c44_tri_init_code[] {
9+
IL91874_BOOSTER_SOFT_START, 3, 0x07, 0x07, 0x17,
10+
IL91874_POWER_ON, 0,
11+
0xFF, 200,
12+
IL91874_PANEL_SETTING, 1, 0x0F, // OTP lut
13+
IL91874_PDRF, 1, 0x00,
14+
15+
0xF8, 2, 0x60, 0xA5, // boost
16+
0xF8, 2, 0x73, 0x23, // boost
17+
0xF8, 2, 0x7C, 0x00, // boost
18+
19+
0xFE // EOM
20+
};
21+
22+
// clang-format on
23+
624
class ThinkInk_270_Tricolor_C44 : public Adafruit_IL91874 {
725
private:
826
public:
@@ -17,12 +35,17 @@ class ThinkInk_270_Tricolor_C44 : public Adafruit_IL91874 {
1735

1836
void begin(thinkinkmode_t mode = THINKINK_TRICOLOR) {
1937
Adafruit_IL91874::begin(true);
38+
setBlackBuffer(0, false);
39+
setColorBuffer(1, false);
40+
41+
_epd_init_code = ti_270c44_tri_init_code;
42+
_epd_lut_code = NULL;
2043

21-
layer_colors[EPD_WHITE] = 0b10;
44+
layer_colors[EPD_WHITE] = 0b00;
2245
layer_colors[EPD_BLACK] = 0b01;
2346
layer_colors[EPD_RED] = 0b10;
2447
layer_colors[EPD_GRAY] = 0b10;
25-
layer_colors[EPD_LIGHT] = 0b10;
48+
layer_colors[EPD_LIGHT] = 0b00;
2649
layer_colors[EPD_DARK] = 0b01;
2750

2851
default_refresh_delay = 13000;

0 commit comments

Comments
 (0)