Heltec Wireless Paper, VM-E213 Hardware Revisions (#7258)

* Tests to identify display model

* (InkHUD) SSD1682 controller IC
Has a few quirks, gets its own base class

* (InkHUD) E0213A367 Display
For Heltec Wireless Paper V1.1.1, V1.2
For Heltec VM-E213 V1.1

* (InkHUD) Select display model at boot

* (BaseUI) Wrapper to combine multiple GxEPD2 drivers
Workaround for issue of GxEPD2_BW objects not having a shared base class. Allows us to select a driver at runtime.
https://github.com/meshtastic/firmware/issues/6851#issuecomment-2905353447

* (BaseUI) Select E-Ink model at boot

* (InkHUD) SSD1682 deep sleep

* (InkHUD) No deep sleep for SSD1682

* (InkHUD) Fully no-op deep sleep for SSD1682
This commit is contained in:
todd-herbert
2025-07-09 06:01:48 +12:00
committed by GitHub
parent 9c08220d24
commit db4e4e6e53
13 changed files with 483 additions and 14 deletions

View File

@@ -18,13 +18,21 @@
// Shared NicheGraphics components
// --------------------------------
#include "graphics/niche/Drivers/EInk/E0213A367.h"
#include "graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h"
#include "graphics/niche/Inputs/TwoButton.h"
#include "einkDetect.h" // Detect display model at runtime
void setupNicheGraphics()
{
using namespace NicheGraphics;
// Detect E-Ink Model
// -------------------
EInkDetectionResult displayModel = detectEInk();
// SPI
// -----------------------------
@@ -35,7 +43,13 @@ void setupNicheGraphics()
// E-Ink Driver
// -----------------------------
Drivers::EInk *driver = new Drivers::LCMEN213EFC1;
Drivers::EInk *driver;
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1
driver = new Drivers::LCMEN213EFC1;
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2
driver = new Drivers::E0213A367;
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
// InkHUD
@@ -48,7 +62,11 @@ void setupNicheGraphics()
// Set how many FAST updates per FULL update
// Set how unhealthy additional FAST updates beyond this number are
inkhud->setDisplayResilience(10, 1.5);
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1 (unmarked)
inkhud->setDisplayResilience(10, 1.5);
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2
inkhud->setDisplayResilience(15, 3);
// Select fonts
InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;