Add RAK4361_5005_RAK14000 board variant and enable e-Paper module (#1199)

* Create platformio.ini

* Create variant.cpp

* Create variant.h

* Update EInkDisplay2.cpp

* Update build-all.sh
This commit is contained in:
Mark Trevor Birss
2022-02-19 15:30:30 +02:00
committed by GitHub
parent e7e001c159
commit 8303500b74
5 changed files with 300 additions and 4 deletions

View File

@@ -9,14 +9,21 @@
#define COLORED GxEPD_BLACK
#define UNCOLORED GxEPD_WHITE
#if defined(TTGO_T_ECHO)
#define TECHO_DISPLAY_MODEL GxEPD2_154_D67
#elif defined(RAK4630)
#define TECHO_DISPLAY_MODEL GxEPD2_213_B74
#endif
GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *adafruitDisplay;
EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl)
{
#if defined(TTGO_T_ECHO)
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
#elif defined(RAK4630)
setGeometry(GEOMETRY_RAWMODE, 250, 122);
#endif
// setGeometry(GEOMETRY_RAWMODE, 128, 64); // old resolution
// setGeometry(GEOMETRY_128_64); // We originally used this because I wasn't sure if rawmode worked - it does
}
@@ -50,7 +57,12 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
}
}
DEBUG_MSG("Updating eink... ");
#if defined(TTGO_T_ECHO)
DEBUG_MSG("Updating T-ECHO E-Paper... ");
#elif defined(RAK4630)
DEBUG_MSG("Updating RAK4361_5005 E-Paper... ");
#endif
// ePaper.Reset(); // wake the screen from sleep
adafruitDisplay->display(false); // FIXME, use partial update mode
// Put screen to sleep to save power (possibly not necessary because we already did poweroff inside of display)