diff options
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() { |
