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
pull/200/head
Niccolò Izzo 2023-10-17 08:51:09 +02:00 zatwierdzone przez Silvano Seva
rodzic 4697be5ea6
commit 95e79e871d
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

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