File tree Expand file tree Collapse file tree 3 files changed +29
-12
lines changed
Expand file tree Collapse file tree 3 files changed +29
-12
lines changed Original file line number Diff line number Diff line change 1- / gcode
1+ * . gcode
Original file line number Diff line number Diff line change 66#include <GxEPD2_BW.h>
77#include <Keypad.h>
88
9+ // Around April 2020 Waveshare started shipping a new version of the
10+ // "Waveshare 200x200, 1.54inch E-Ink display module". The new
11+ // versions have "Rev2.1" printed under the title on the circuit side
12+ // of the display. This new version requires a different driver
13+ // module from GxEPD2.
14+ //
15+ // If you have an *older* display (doesn't have "Rev2.1") uncomment
16+ // the following line:
17+ //
18+ // #define LEGACY_WAVESHARE
19+
20+ #if !defined(LEGACY_WAVESHARE )
21+ #define EPD_DRIVER GxEPD2_154_D67
22+ #else
23+ #define EPD_DRIVER GxEPD2_154
24+ #endif
25+
926// This is hard to hide/encapsulate.
10- extern GxEPD2_BW < GxEPD2_154 , GxEPD2_154 ::HEIGHT > g_display ;
27+ extern GxEPD2_BW < EPD_DRIVER , EPD_DRIVER ::HEIGHT > g_display ;
1128
1229void hw_setup ();
1330void hw_green_led (int value );
Original file line number Diff line number Diff line change @@ -66,17 +66,17 @@ extern "C" {
6666
6767// Display
6868#if defined(ESP32)
69- GxEPD2_BW<GxEPD2_154, GxEPD2_154 ::HEIGHT>
70- g_display (GxEPD2_154 (/* CS=*/ 21 ,
71- /* DC=*/ 17 ,
72- /* RST=*/ 16 ,
73- /* BUSY=*/ 4 ));
69+ GxEPD2_BW<EPD_DRIVER, EPD_DRIVER ::HEIGHT>
70+ g_display (EPD_DRIVER (/* CS=*/ 21 ,
71+ /* DC=*/ 17 ,
72+ /* RST=*/ 16 ,
73+ /* BUSY=*/ 4 ));
7474#elif defined(SAMD51)
75- GxEPD2_BW<GxEPD2_154, GxEPD2_154 ::HEIGHT>
76- g_display (GxEPD2_154 (/* CS=*/ PIN_A4,
77- /* DC=*/ PIN_A3,
78- /* RST=*/ PIN_A2,
79- /* BUSY=*/ PIN_A1));
75+ GxEPD2_BW<EPD_DRIVER, EPD_DRIVER ::HEIGHT>
76+ g_display (EPD_DRIVER (/* CS=*/ PIN_A4,
77+ /* DC=*/ PIN_A3,
78+ /* RST=*/ PIN_A2,
79+ /* BUSY=*/ PIN_A1));
8080#endif
8181
8282// Keypad
You can’t perform that action at this time.
0 commit comments