Skip to content

Commit

Permalink
Version 1.5.5
Browse files Browse the repository at this point in the history
- updated 7-color driver classes (design cleanup fixed)
- note: Waveshare PhotoPainter doesn't work with MBED Pico package
- note: use package https://github.com/earlephilhower/arduino-pico for PhotoPainter
  • Loading branch information
ZinggJM committed Jan 15, 2024
1 parent 3d58389 commit 220fc58
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 27 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@
- promotion panels from suppliers are welcome, to add support to GxEPD2
- donation panels from users are welcome, to add support to GxEPD2

### Version 1.5.4
### Version 1.5.5
- updated 7-color driver classes (design cleanup fixed)
- note: Waveshare PhotoPainter doesn't work with MBED Pico package
- note: use package https://github.com/earlephilhower/arduino-pico for PhotoPainter
#### Version 1.5.4
- added support for GDEQ031T10 3.1" b/w 240x320
- updated support for GDEY075T7 7.5" b/w 800x480
- renamed driver class GxEPD2_750_YT7 to GxEPD2_750_GDEY075T7
Expand Down
3 changes: 2 additions & 1 deletion examples/GxEPD2_Example/GxEPD2_Example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
arduino::MbedSPI SPIn(4, 7, 6); // need be valid pins for same SPI channel, else fails blinking 4 long 4 short
// uncomment next line for use with my proto board. // MbedSPI(int miso, int mosi, int sck);
//arduino::MbedSPI SPIn(4, 3, 2); // need be valid pins for same SPI channel, else fails blinking 4 long 4 short
// uncomment next line for use with Waveshare Pico-ePaper-2.9 or PhotoPainter. // MbedSPI(int miso, int mosi, int sck);
// uncomment next line for use with Waveshare Pico-ePaper-2.9. // MbedSPI(int miso, int mosi, int sck);
// note: doesn't work with Waveshare PhotoPainter, conflict on pin 12. use philhower package instead.
//arduino::MbedSPI SPIn(12, 11, 10); // need be valid pins for same SPI channel, else fails blinking 4 long 4 short
#else // package https://github.com/earlephilhower/arduino-pico
// SPIClassRP2040(spi_inst_t *spi, pin_size_t rx, pin_size_t cs, pin_size_t sck, pin_size_t tx);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GxEPD2
version=1.5.4
version=1.5.5
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
10 changes: 3 additions & 7 deletions src/epd7c/GxEPD2_565c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ void GxEPD2_565c::writeScreenBuffer(uint8_t black_value, uint8_t color_value)
_transfer(0xFF == black_value ? 0x11 : black_value);
}
_endTransfer();
_initial_write = false; // initial full screen buffer clean done
}

void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
Expand All @@ -56,7 +55,6 @@ void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -130,7 +128,6 @@ void GxEPD2_565c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -241,7 +238,6 @@ void GxEPD2_565c::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -308,7 +304,6 @@ void GxEPD2_565c::writeImagePart(const uint8_t* black, const uint8_t* color, int
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -368,7 +363,6 @@ void GxEPD2_565c::writeNative(const uint8_t* data1, const uint8_t* data2, int16_
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -456,7 +450,6 @@ void GxEPD2_565c::writeNativePart(const uint8_t* data1, const uint8_t* data2, in
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -595,6 +588,7 @@ void GxEPD2_565c::_InitDisplay()
digitalWrite(_rst, HIGH);
delay(2);
_waitWhileBusy("_InitDisplay reset", power_on_time);
_initial_write = false; // used for initial reset done
_hibernating = false;
_power_is_on = false;
}
Expand Down Expand Up @@ -630,4 +624,6 @@ void GxEPD2_565c::_InitDisplay()
delay(100);
_writeCommand(0x50); // VCOM and Data Interval Setting
_writeData(0x37); // white border
_PowerOn();
_init_display_done = true;
}
8 changes: 1 addition & 7 deletions src/epd7c/GxEPD2_730c_ACeP_730.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void GxEPD2_730c_ACeP_730::writeScreenBuffer(uint8_t black_value, uint8_t color_
_transfer(0xFF == black_value ? 0x11 : black_value);
}
_endTransfer();
_initial_write = false; // initial full screen buffer clean done
}

void GxEPD2_730c_ACeP_730::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
Expand All @@ -55,7 +54,6 @@ void GxEPD2_730c_ACeP_730::writeImage(const uint8_t bitmap[], int16_t x, int16_t
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -129,7 +127,6 @@ void GxEPD2_730c_ACeP_730::writeImage(const uint8_t* black, const uint8_t* color
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -240,7 +237,6 @@ void GxEPD2_730c_ACeP_730::writeImagePart(const uint8_t bitmap[], int16_t x_part
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -307,7 +303,6 @@ void GxEPD2_730c_ACeP_730::writeImagePart(const uint8_t* black, const uint8_t* c
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -367,7 +362,6 @@ void GxEPD2_730c_ACeP_730::writeNative(const uint8_t* data1, const uint8_t* data
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -455,7 +449,6 @@ void GxEPD2_730c_ACeP_730::writeNativePart(const uint8_t* data1, const uint8_t*
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -595,6 +588,7 @@ void GxEPD2_730c_ACeP_730::_InitDisplay()
digitalWrite(_rst, HIGH);
delay(2);
_waitWhileBusy("_InitDisplay reset", power_on_time);
_initial_write = false; // used for initial reset done
_hibernating = false;
_power_is_on = false;
}
Expand Down
10 changes: 2 additions & 8 deletions src/epd7c/GxEPD2_730c_GDEY073D46.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void GxEPD2_730c_GDEY073D46::writeScreenBuffer(uint8_t black_value, uint8_t colo
_transfer(0xFF == black_value ? 0x11 : black_value);
}
_endTransfer();
_initial_write = false; // initial full screen buffer clean done
}

void GxEPD2_730c_GDEY073D46::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
Expand All @@ -55,7 +54,6 @@ void GxEPD2_730c_GDEY073D46::writeImage(const uint8_t bitmap[], int16_t x, int16
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -129,7 +127,6 @@ void GxEPD2_730c_GDEY073D46::writeImage(const uint8_t* black, const uint8_t* col
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -240,7 +237,6 @@ void GxEPD2_730c_GDEY073D46::writeImagePart(const uint8_t bitmap[], int16_t x_pa
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -307,7 +303,6 @@ void GxEPD2_730c_GDEY073D46::writeImagePart(const uint8_t* black, const uint8_t*
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -367,7 +362,6 @@ void GxEPD2_730c_GDEY073D46::writeNative(const uint8_t* data1, const uint8_t* da
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
{
//Serial.println("paged");
Expand Down Expand Up @@ -455,7 +449,6 @@ void GxEPD2_730c_GDEY073D46::writeNativePart(const uint8_t* data1, const uint8_t
h1 -= dy;
if ((w1 <= 0) || (h1 <= 0)) return;
if (!_init_display_done) _InitDisplay();
if (_initial_write) writeScreenBuffer();
_writeCommand(0x10);
_startTransfer();
for (int16_t i = 0; i < int16_t(HEIGHT); i++)
Expand Down Expand Up @@ -589,12 +582,13 @@ void GxEPD2_730c_GDEY073D46::_InitDisplay()
{
pinMode(_rst, OUTPUT); // just in case
digitalWrite(_rst, HIGH);
delay(20);
delay(50); // needs a little longer
digitalWrite(_rst, LOW);
delay(20);
digitalWrite(_rst, HIGH);
delay(2);
_waitWhileBusy("_InitDisplay reset", power_on_time);
_initial_write = false; // used for initial reset done
_hibernating = false;
_power_is_on = false;
}
Expand Down
3 changes: 1 addition & 2 deletions src/gdey/GxEPD2_750_GDEY075T7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ void GxEPD2_750_GDEY075T7::_setPartialRamArea(uint16_t x, uint16_t y, uint16_t w
_writeData(y % 256);
_writeData(ye / 256);
_writeData(ye % 256);
_writeData(0x01); // don't see any difference
//_writeData(0x00); // don't see any difference
_writeData(0x01);
}

void GxEPD2_750_GDEY075T7::_PowerOn()
Expand Down

0 comments on commit 220fc58

Please sign in to comment.