Merge pull request #1867 from t413/techo-shutdown-backlight

Powers off eink backlights before shutdown
This commit is contained in:
Thomas Göttgens
2022-10-28 11:23:05 +02:00
committed by GitHub
co-authored by GitHub
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ class ButtonThread : public concurrency::OSThread
static void userButtonDoublePressed()
{
#if defined(USE_EINK)
#if defined(USE_EINK) && defined(PIN_EINK_EN)
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
#endif
}
+3
View File
@@ -234,6 +234,9 @@ bool Power::setup()
void Power::shutdown()
{
#if defined(USE_EINK) && defined(PIN_EINK_EN)
digitalWrite(PIN_EINK_EN, LOW); //power off backlight first
#endif
#ifdef HAS_PMU
DEBUG_MSG("Shutting down\n");