fix GPIO0 mode after I2S audio

This commit is contained in:
mverch67 2024-09-27 15:14:22 +02:00 committed by Thomas Göttgens
parent a8c216f4f8
commit 363fd8ab98

View File

@ -98,6 +98,13 @@ int32_t ExternalNotificationModule::runOnce()
LOG_INFO("%d ", i);
}
LOG_INFO("\n");
#ifdef HAS_I2S
// GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library
// T-Deck uses GPIO0 as trackball button, so restore the mode
#if defined(T_DECK) || (defined(BUTTON_PIN) && BUTTON_PIN == 0)
pinMode(0, INPUT);
#endif
#endif
isNagging = false;
return INT32_MAX; // save cycles till we're needed again
}