From 95e79e871d2547e2395d8a6a4770c7e521211527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Tue, 17 Oct 2023 08:51:09 +0200 Subject: [PATCH] ttwrplus: Add emergency shutdown Enabled 10 second long press emergency shutdown PMU function to be able to reset the radio even when OpenRTX is freezed, without the need of pulling out and back in the battery. TG-553 --- platform/targets/ttwrplus/pmu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/targets/ttwrplus/pmu.cpp b/platform/targets/ttwrplus/pmu.cpp index 31918937..6219dd60 100644 --- a/platform/targets/ttwrplus/pmu.cpp +++ b/platform/targets/ttwrplus/pmu.cpp @@ -198,7 +198,7 @@ void pmu_init() printk("===========================================================================\n"); // Set the time of pressing the button to turn off - PMU.setPowerKeyPressOffTime(XPOWERS_POWEROFF_4S); + PMU.setPowerKeyPressOffTime(XPOWERS_POWEROFF_10S); uint8_t opt = PMU.getPowerKeyPressOffTime(); printk("PowerKeyPressOffTime:"); switch (opt) @@ -289,8 +289,8 @@ void pmu_init() // NOTE: Target voltage set to 4.00V (80% charge) to extend battery lifespan of 2.5x-3x PMU.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V); - // Disable the PMU long press shutdown function - PMU.disableLongPressShutdown(); + // Enable the PMU long press shutdown function (emergency shutdown) + PMU.enableLongPressShutdown(); // Get charging target current