Simplify HAS_PMU macro definition

This commit is contained in:
lewishe
2022-09-08 10:36:53 +08:00
parent 9244d03cf9
commit 35c77ef99c
7 changed files with 15 additions and 12 deletions

View File

@@ -128,7 +128,7 @@ class ButtonThread : public concurrency::OSThread
#endif
// If user button is held down for 5 seconds, shutdown the device.
if ((millis() - longPressTime > 5 * 1000) && (longPressTime > 0)) {
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
#ifdef HAS_PMU
if (pmu_found == true) {
setLed(false);
power->shutdown();