Skip to content
Merged
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
459 changes: 0 additions & 459 deletions libraries/GxEPD2-master/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion libraries/GxEPD2-master/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GxEPD2
version=1.5.2
version=1.6.9
author=Jean-Marc Zingg
maintainer=Jean-Marc Zingg
sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare.
Expand Down
48 changes: 41 additions & 7 deletions libraries/GxEPD2-master/src/GxEPD2.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
// Requires HW SPI and Adafruit_GFX. Caution: these e-papers require 3.3V supply AND data lines!
// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines!
//
// based on Demo Example from Good Display: http://www.e-paper-display.com/download_list/downloadcategoryid=34&isMode=false.html
// Display Library based on Demo Example from Good Display: https://www.good-display.com/companyfile/32/
//
// Author: Jean-Marc Zingg
//
Expand Down Expand Up @@ -64,21 +64,33 @@ class GxEPD2
GDEM029T94,
GDEY029T94,
DEPG0290BS,
GDEY029T71H,
GDEW027W3, Waveshare_2_7_bw = GDEW027W3,
GDEY027T91,
GDEQ031T10,
ED037TC1,
GDEY037T03,
GDEW0371W7, Waveshare_3_7_bw = GDEW0371W7,
GDEM0397T81,
GDEW042T2, Waveshare_4_2_bw = GDEW042T2,
GDEW042M01,
GDEY042T91,
GDEY042T81,
GYE042A87,
SE0420NQ04,
GDEQ0426T82,
GDEH0576T81,
GDEY0579T93,
GDEW0583T7, Waveshare_5_83_bw = GDEW0583T7,
GDEW0583T8,
GDEQ0583T31,
GDEW075T8, Waveshare_7_5_bw = GDEW075T8,
GDEW075T7, Waveshare_7_5_bw_T7 = GDEW075T7,
GDEY075T7,
GDEM102T91,
GDEM1085T51,
GDEH116T91,
GDEW1248T3, Waveshare_12_24_bw = GDEW1248T3,
GDEM133T91,
ED060SCT, // on Waveshare IT8951 Driver HAT
ED060KC1, // on Waveshare IT8951 Driver HAT 1448x1072
ED078KC2, // on Waveshare IT8951 Driver HAT 1872x1404
Expand All @@ -96,15 +108,37 @@ class GxEPD2
GDEW027C44, Waveshare_2_7_bwr = GDEW027C44,
GDEW042Z15, Waveshare_4_2_bwr = GDEW042Z15,
GDEQ042Z21, Waveshare_4_2_V2_bwr = GDEQ042Z21,
GDEY042Z98,
GDEY0579Z93,
GDEQ0583Z31,
GDEW0583Z21, Waveshare_5_83_bwr = GDEW0583Z21,
GDEW0583Z83,
Waveshare437inch4color,
ACeP565, Waveshare_5_65_7c = ACeP565,
GDEY073D46,
GDEW075Z09, Waveshare_7_5_bwr = GDEW075Z09,
GDEW075Z08, Waveshare_7_5_bwr_Z08 = GDEW075Z08,
GDEY075Z08,
GDEH075Z90, Waveshare_7_5_bwr_Z90 = GDEH075Z90,
GDEY1248Z51
GDEY116Z91,
GDEY1248Z51,
GDEM133Z91,
// 4-color
GDEM0154F51H,
GDEY0213F51,
GDEY0266F51H,
GDEY029F51H,
Waveshare3inch4color,
GDEM035F51,
GDEM0397F81,
GDEY0420F51,
Waveshare437inch4color,
GDEY0579F51,
GDEM075F52,
GDEY116F51,
// 7-color
ACeP565, Waveshare_5_65_7c = ACeP565,
GDEP0565D90,
GDEY073D46,
ACeP730, Waveshare_7_30_7c = ACeP730,
GDEP073E01,
};
};

Expand Down
53 changes: 37 additions & 16 deletions libraries/GxEPD2-master/src/GxEPD2_3C.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
// Requires HW SPI and Adafruit_GFX. Caution: these e-papers require 3.3V supply AND data lines!
// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines!
//
// based on Demo Example from Good Display: http://www.e-paper-display.com/download_list/downloadcategoryid=34&isMode=false.html
// Display Library based on Demo Example from Good Display: https://www.good-display.com/companyfile/32/
//
// Author: Jean-Marc Zingg
//
Expand Down Expand Up @@ -75,7 +75,7 @@
#if __has_include("epd3c/GxEPD2_266c.h")
#include "epd3c/GxEPD2_266c.h"
#endif
#if __has_include("epd3c/GxEPD2_150_BN.h")
#if __has_include("epd3c/GxEPD2_270c.h")
#include "epd3c/GxEPD2_270c.h"
#endif
#if __has_include("epd3c/GxEPD2_420c.h")
Expand All @@ -84,15 +84,21 @@
#if __has_include("epd3c/GxEPD2_420c_Z21.h")
#include "epd3c/GxEPD2_420c_Z21.h"
#endif
#if __has_include("gdey3c/GxEPD2_420c_GDEY042Z98.h")
#include "gdey3c/GxEPD2_420c_GDEY042Z98.h"
#endif
#if __has_include("gdey3c/GxEPD2_579c_GDEY0579Z93.h")
#include "gdey3c/GxEPD2_579c_GDEY0579Z93.h"
#endif
#if __has_include("epd3c/GxEPD2_583c.h")
#include "epd3c/GxEPD2_583c.h"
#endif
#if __has_include("gdeq3c/GxEPD2_583c_GDEQ0583Z31.h")
#include "gdeq3c/GxEPD2_583c_GDEQ0583Z31.h"
#endif
#if __has_include("epd3c/GxEPD2_583c_Z83.h")
#include "epd3c/GxEPD2_583c_Z83.h"
#endif
#if __has_include("epd7c/GxEPD2_565c.h")
#include "epd7c/GxEPD2_565c.h"
#endif
#if __has_include("epd3c/GxEPD2_750c.h")
#include "epd3c/GxEPD2_750c.h"
#endif
Expand All @@ -102,9 +108,21 @@
#if __has_include("epd3c/GxEPD2_750c_Z90.h")
#include "epd3c/GxEPD2_750c_Z90.h"
#endif
#if __has_include("epd3c/GxEPD2_750c_GDEW075Z08.h")
#include "epd3c/GxEPD2_750c_GDEW075Z08.h"
#endif
#if __has_include("gdey3c/GxEPD2_750c_GDEY075Z08.h")
#include "gdey3c/GxEPD2_750c_GDEY075Z08.h"
#endif
#if __has_include("gdey3c/GxEPD2_1160c_GDEY116Z91.h")
#include "gdey3c/GxEPD2_1160c_GDEY116Z91.h"
#endif
#if __has_include("epd3c/GxEPD2_1248c.h")
#include "epd3c/GxEPD2_1248c.h"
#endif
#if __has_include("gdem3c/GxEPD2_1330c_GDEM133Z91.h")
#include "gdem3c/GxEPD2_1330c_GDEM133Z91.h"
#endif

template<typename GxEPD2_Type, const uint16_t page_height>
class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
Expand Down Expand Up @@ -170,7 +188,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
y -= _current_page * _page_height;
// check if in current page
if ((y < 0) || (y >= int16_t(_page_height))) return;
uint16_t i = x / 8 + y * (_pw_w / 8);
uint32_t i = x / 8 + uint32_t(y) * uint32_t(_pw_w / 8);
_black_buffer[i] = (_black_buffer[i] | (1 << (7 - x % 8))); // white
_color_buffer[i] = (_color_buffer[i] | (1 << (7 - x % 8)));
if (color == GxEPD_WHITE) return;
Expand Down Expand Up @@ -224,7 +242,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
if (color == GxEPD_WHITE);
else if (color == GxEPD_BLACK) black = 0x00;
else if ((color == GxEPD_RED) || (color == GxEPD_YELLOW)) red = 0x00;
for (uint16_t x = 0; x < sizeof(_black_buffer); x++)
for (uint32_t x = 0; x < sizeof(_black_buffer); x++)
{
_black_buffer[x] = black;
_color_buffer[x] = red;
Expand Down Expand Up @@ -263,9 +281,9 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
w = gx_uint16_min(w, width() - x);
h = gx_uint16_min(h, height() - y);
_rotate(x, y, w, h);
epd2.writeImagePartNew(_black_buffer, x, y, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
epd2.writeImagePartToCurrent(_black_buffer, x, y, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
epd2.refresh_bw(x, y, w, h);
epd2.writeImagePartPrevious(_black_buffer, x, y, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
epd2.writeImagePartToPrevious(_black_buffer, x, y, GxEPD2_Type::WIDTH, _page_height, x, y, w, h);
}

void setFullWindow()
Expand Down Expand Up @@ -371,21 +389,24 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
}
}

bool nextPageToPrevious() {return false;}; // no-op in this class

bool nextPageBW()
{
if (1 == _pages)
{
if (_using_partial_mode)
{
epd2.writeImageNew(_black_buffer, _pw_x, _pw_y, _pw_w, _pw_h);
epd2.writeImageToCurrent(_black_buffer, _pw_x, _pw_y, _pw_w, _pw_h);
epd2.refresh_bw(_pw_x, _pw_y, _pw_w, _pw_h);
epd2.writeImagePrevious(_black_buffer, _pw_x, _pw_y, _pw_w, _pw_h);
epd2.writeImageToPrevious(_black_buffer, _pw_x, _pw_y, _pw_w, _pw_h);
epd2.writeImageToCurrent(_black_buffer, _pw_x, _pw_y, _pw_w, _pw_h);
}
else // full update
{
epd2.writeImage(_black_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
epd2.refresh(false);
epd2.writeImagePrevious(_black_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
epd2.writeImageToPrevious(_black_buffer, 0, 0, GxEPD2_Type::WIDTH, HEIGHT);
epd2.powerOff();
}
return false;
Expand All @@ -402,8 +423,8 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
{
//Serial.print("writeImage("); Serial.print(_pw_x); Serial.print(", "); Serial.print(dest_ys); Serial.print(", ");
//Serial.print(_pw_w); Serial.print(", "); Serial.print(dest_ye - dest_ys); Serial.println(")");
if (!_second_phase) epd2.writeImageNew(_black_buffer, _pw_x, dest_ys, _pw_w, dest_ye - dest_ys);
else epd2.writeImagePrevious(_black_buffer, _pw_x, dest_ys, _pw_w, dest_ye - dest_ys);
epd2.writeImageToCurrent(_black_buffer, _pw_x, dest_ys, _pw_w, dest_ye - dest_ys);
if (_second_phase) epd2.writeImageToPrevious(_black_buffer, _pw_x, dest_ys, _pw_w, dest_ye - dest_ys);
}
else
{
Expand All @@ -430,7 +451,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
else // full update
{
if (!_second_phase) epd2.writeImage(_black_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
else epd2.writeImagePrevious(_black_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
else epd2.writeImageToPrevious(_black_buffer, 0, page_ys, GxEPD2_Type::WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
_current_page++;
if (_current_page == _pages)
{
Expand Down
Loading
Loading