Skip to content

Commit

Permalink
Version 1.4.0
Browse files Browse the repository at this point in the history
- changed the default reset duration to 10ms instead of 20ms
- changed the delay after reset to 10ms or reset duration, whichever is higher, instead of 200ms
- added a busyCallback feature, to allow to service periodic actions during wait for BUSY termination
- ` // register a callback function to be called during _waitWhileBusy continuously. `
- ` void setBusyCallback(void (*busyCallback)(const void*), const void* busy_callback_parameter = 0); `
- added example GxEPD2_RotaryUsingBusyCallback.ino
  • Loading branch information
ZinggJM committed Dec 9, 2021
1 parent 13ada68 commit 7068ba3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
// define the pins to be used by the BasicEncoder
const int8_t pinA = 5; // D1 on my Wemos D1 mini
const int8_t pinB = 16; // D0 on my Wemos D1 mini
//const int8_t pinA = 2; // on UNO
//const int8_t pinB = 3; // on UNO

BasicEncoder encoder(pinA, pinB);

Expand All @@ -59,7 +61,8 @@ void setup()
Serial.println();
Serial.println("setup");
delay(100);
display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
display.init(); // disable diagnostics to avoid delay and catch most rotary pulses
//display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
//display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
display.epd2.setBusyCallback(busyCallback); // register callback to be called during BUSY active time
// first update should be full refresh
Expand Down Expand Up @@ -112,6 +115,7 @@ const char EncoderValue[] = "Encoder = ";
class PrintString : public Print, public String
{
public:
PrintString(const char s[]) : String(s){};
size_t write(uint8_t data) override
{
return concat(char(data));
Expand Down

0 comments on commit 7068ba3

Please sign in to comment.