Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Arduino/epd4in2/epd4in2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void Epd::SetPartialWindow(const unsigned char* buffer_black, int x, int y, int
SendCommand(PARTIAL_WINDOW);
SendData(x >> 8);
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData((x + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);
Expand Down
6 changes: 3 additions & 3 deletions Arduino/epd4in2bc/epd4in2b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void Epd::SetPartialWindow(const unsigned char* buffer_black, const unsigned cha
SendCommand(PARTIAL_WINDOW);
SendData(x >> 8);
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData((x + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);
Expand Down Expand Up @@ -136,7 +136,7 @@ void Epd::SetPartialWindowBlack(const unsigned char* buffer_black, int x, int y,
SendCommand(PARTIAL_WINDOW);
SendData(x >> 8);
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData((x + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);
Expand All @@ -162,7 +162,7 @@ void Epd::SetPartialWindowRed(const unsigned char* buffer_red, int x, int y, int
SendCommand(PARTIAL_WINDOW);
SendData(x >> 8);
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData((x + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);
Expand Down