Skip to content

Commit 9713e36

Browse files
committed
Fixed BMP on Inkplate6/6Plus/10, fixed Inkplate6Color background color, fixed Inkplate6Color color palette, init seq.
1 parent 88ce396 commit 9713e36

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

src/boards/Inkplate6Color.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ bool Inkplate::begin(void)
5757
DMemory4Bit = (uint8_t *)ps_malloc(E_INK_WIDTH * E_INK_HEIGHT / 2);
5858
if (DMemory4Bit == NULL)
5959
{
60-
// Serial.println("Memory allocation failed, program stops!");
6160
return false;
6261
}
6362

@@ -76,25 +75,22 @@ bool Inkplate::begin(void)
7675
return false;
7776

7877
// Send whole bunch of commands and data
79-
uint8_t panel_set_data[] = {0xef, 0x08};
78+
uint8_t panel_set_data[] = {0xEF, 0x08};
8079
sendCommand(PANEL_SET_REGISTER);
8180
sendData(panel_set_data, 2);
8281

83-
uint8_t power_set_data[] = {0x37, 0x00, 0x23, 0x23};
82+
uint8_t power_set_data[] = {0x37, 0x00, 0x05, 0x05};
8483
sendCommand(POWER_SET_REGISTER);
8584
sendData(power_set_data, 4);
8685

8786
sendCommand(POWER_OFF_SEQ_SET_REGISTER);
8887
sendData(0x00);
8988

90-
uint8_t booster_softstart_data[] = {0xc7, 0xc7, 0x1d};
89+
uint8_t booster_softstart_data[] = {0xC7, 0xC7, 0x1D};
9190
sendCommand(BOOSTER_SOFTSTART_REGISTER);
9291
sendData(booster_softstart_data, 3);
9392

94-
sendCommand(PLL_CONTROL_REGISTER);
95-
sendData(0x3c);
96-
97-
sendCommand(TEMP_SENSOR_REGISTER);
93+
sendCommand(TEMP_SENSOR_EN_REGISTER);
9894
sendData(0x00);
9995

10096
sendCommand(VCOM_DATA_INTERVAL_REGISTER);
@@ -103,16 +99,14 @@ bool Inkplate::begin(void)
10399
sendCommand(0x60);
104100
sendData(0x20);
105101

106-
uint8_t res_set_data[] = {0x02, 0x58, 0x01, 0xc0};
102+
uint8_t res_set_data[] = {0x02, 0x58, 0x01, 0xC0};
107103
sendCommand(RESOLUTION_SET_REGISTER);
108104
sendData(res_set_data, 4);
109105

110106
sendCommand(0xE3);
111-
sendData(0xaa);
107+
sendData(0xAA);
112108

113109
delay(100);
114-
sendCommand(0x50);
115-
sendData(0x37);
116110

117111
setIOExpanderForLowPower();
118112

src/include/ImageBMP.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,10 @@ void Image::displayBmpLine(int16_t x, int16_t y, bitmapHeader *bmpHeader, bool d
484484
writePixel(x + j, y, val);
485485
break;
486486
}
487-
488-
ditherSwap(w);
489-
endWrite();
490487
}
491488
}
489+
ditherSwap(w);
490+
endWrite();
492491
}
493492

494493
/**

src/include/ImageDitherColor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static uint32_t pallete[] = {
3131

3232
#if defined(ARDUINO_INKPLATECOLOR)
3333

34-
static uint32_t pallete[] = {0x000000, 0xFFFFFF, 0x438A1C, 0x555E7E, 0x8A4C5B, 0xFFF338, 0xE87E00, 0xC2A4F4};
34+
static uint32_t pallete[] = {0x000000, 0xFFFFFF, 0x00FF00, 0x0000FF, 0xFF0000, 0xFFFF00, 0xFF8000};
3535
static unsigned int width = E_INK_WIDTH, height = E_INK_HEIGHT;
3636

3737
#elif defined(ARDUINO_INKPLATE2)

0 commit comments

Comments
 (0)