diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2021-04-18 19:07:16 +0200 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2021-04-18 19:07:33 +0200 |
| commit | 98eccedee02bc3c21696222685e0f0cc5f0ea68a (patch) | |
| tree | 4a48056b2c561892a1c0a5498a20b43f8d87d241 /src | |
| parent | da34823f94f84e2e5c5181701e6604bec20aa04a (diff) | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2ebf777..0284ff7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,6 +9,25 @@ #define USE_DHCP 0 +#define EPULSE_BOARD + +#if defined(WAVESHARE_BOARD) + #define SCK 13 + #define MOSI 14 + #define CS 15 + #define RST 26 + #define DC 27 + #define BUSY 25 +#elif defined(EPULSE_BOARD) + #define SCK 18 + #define MISO 19 + #define MOSI 23 + #define CS 5 + #define RST 2 + #define DC 0 + #define BUSY 4 +#endif + /* see GxEPD2_WS_ESP32_Driver.ino and esp32-waveshare-epd/src/DEV_Config.h @@ -21,8 +40,18 @@ mapping of Waveshare ESP32 Driver Board BUSY -> 25, RST -> 26, DC -> 27, CS-> 15, CLK -> 13, DIN -> 14 + + + thingpulse ePulse board: + CLK = SCK = 18 + DIN = MOSI = 23 + CS = 5 + DC = 0 + RST = 2 + BUSY = 4 */ -GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/*CS=*/ 15, /*DC=*/ 27, /*RST=*/ 26, /*BUSY=*/ 25)); + +GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(CS, DC, RST, BUSY)); U8G2_FOR_ADAFRUIT_GFX u8g2Fonts; @@ -34,7 +63,7 @@ extern GxEPD2_GFX_BASE_CLASS &get_display() { void board_spi_setup() { /* board-specific setup */ SPI.end(); - SPI.begin(13, 12, 14, 15); + SPI.begin(SCK, MISO, MOSI, CS); } void display_setup() { |
