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

Powers off eink backlights before shutdown
pull/1871/head
Thomas Göttgens 2022-10-28 11:23:05 +02:00 zatwierdzone przez GitHub
commit 0091863888
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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
}

Wyświetl plik

@ -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");