GxEPD2 Unable to connect ESP32-C3 with 1.54inch e-ink display (IL3829)

been doing some progress.. looks like the driver is IL0373, despite what they say elsewhere:
https://heltec.org/project/154-e-ink/

1. Tried modding driver files for the display

Based on GxEPD2_150_BN .h and .cpp:

  • copied and renamed to GxEPD2_160_BN
  • adjusted dimensions to 160x160 (152x152 leaves a gap)
  • replaced all references to GxEDP2_150_BN, now GxEDP2_160_BN
//sample from GxEPD2_160_BN.h
#ifndef _GxEPD2_160_BN_H_
#define _GxEPD2_160_BN_H_

#include "../GxEPD2_EPD.h"

class GxEPD2_160_BN : public GxEPD2_EPD
{
  public:
    // attributes
    static const uint16_t WIDTH = 160;
    static const uint16_t HEIGHT = 160;
    static const GxEPD2::Panel panel = GxEPD2::HTEW0154T8_V20;//new panel name
    static const bool hasColor = false;
    static const bool hasPartialUpdate = true;
    static const bool hasFastPartialUpdate = true;
    static const uint16_t power_on_time = 100; // ms, e.g. 94000us
    static const uint16_t power_off_time = 150; // ms, e.g. 140000us
    static const uint16_t full_refresh_time = 2500; // ADJUSTED TO SPECS!
    static const uint16_t partial_refresh_time = 350; // ADJUSTED TO SPECS!
    // constructor
    GxEPD2_160_BN(int16_t cs, int16_t dc, int16_t rst, int16_t busy);
   //replace references also in .cpp file

2. Refer file .h in GxEPD2_BW.h

#include "GxEPD2_EPD.h"
#include "epd/GxEPD2_102.h"
#include "epd/GxEPD2_150_BN.h"
#include "epd/GxEPD2_160_BN.h"

3. Added panel name to GxEDP2.h

class GxEPD2
{
  public:
    enum Panel
    {
      GDEW0102T4, Waveshare_1_02_bw = GDEW0102T4,
      GDEP015OC1, Waveshare_1_54_bw = GDEP015OC1,
      DEPG0150BN,
      HTEW0154T8_V20,//new panel name
      GDEH0154D67, Waveshare_1_54_bw_D67 = GDEH0154D67,

4. Defined display as per GxEPD_150_BN (custom pin definition for ESP32C3)

GxEPD2_BW<GxEPD2_160_BN, GxEPD2_160_BN::HEIGHT> display(GxEPD2_160_BN(/*CS=D8*/ 5, /*DC=D3*/ 20, /*RST=D4*/ -1, /*BUSY=D2*/ 9)); // HTEW0154T8_V20 152x152, IL0373

5. Assigned SPI pins manually as in ESP32 driver example

  //insert after init
  display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
  //custom SPI definition for ESP32C3
  SPI.end(); // release standard SPI pins
  SPI.begin(8, 9, 10, 5); // map and init SPI pins
  //keep on with script
  helloWorld();

See below how GFX_Example works!
(bitmaps are 200x200 so they fall outside the display)
epaper2

I can't upload files as a new user, so I forked the github library and added the files to /src in case anyone needs them or JM wants to add to original library:
https://github.com/TheRoam/GxEPD2_Heltec-mods

All ready to crack on!