Initial support for the ThinkNode M5 (#7502)

* Initial support for the ThinkNode M5

* Update variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini

Co-authored-by: Austin <vidplace7@gmail.com>

* Cleanup variant.h for Elecrow Thinknode M5

* Properly detect battery voltage

* Turn backlight off when screen sleeps

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Austin <vidplace7@gmail.com>
This commit is contained in:
Jonathan Bennett
2025-08-07 06:28:15 -05:00
committed by GitHub
parent a23c58c10a
commit 691327b2db
10 changed files with 184 additions and 5 deletions

View File

@@ -391,6 +391,10 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
dispdev->displayOn();
#endif
#ifdef ELECROW_ThinkNode_M5
io.digitalWrite(PCA_PIN_EINK_EN, HIGH);
#endif
#if defined(ST7789_CS) && \
!defined(M5STACK) // set display brightness when turning on screens. Just moved function from TFTDisplay to here.
static_cast<TFTDisplay *>(dispdev)->setDisplayBrightness(brightness);
@@ -425,6 +429,11 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
digitalWrite(PIN_EINK_EN, LOW);
}
#endif
#ifdef ELECROW_ThinkNode_M5
io.digitalWrite(PCA_PIN_EINK_EN, LOW);
#endif
dispdev->displayOff();
#ifdef USE_ST7789
SPI1.end();