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
This commit is contained in:
Niccolò Izzo 2023-10-17 08:51:09 +02:00 committed by Silvano Seva
parent 4697be5ea6
commit 95e79e871d
1 changed files with 3 additions and 3 deletions

View File

@ -198,7 +198,7 @@ void pmu_init()
printk("===========================================================================\n"); printk("===========================================================================\n");
// Set the time of pressing the button to turn off // 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(); uint8_t opt = PMU.getPowerKeyPressOffTime();
printk("PowerKeyPressOffTime:"); printk("PowerKeyPressOffTime:");
switch (opt) 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 // NOTE: Target voltage set to 4.00V (80% charge) to extend battery lifespan of 2.5x-3x
PMU.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V); PMU.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V);
// Disable the PMU long press shutdown function // Enable the PMU long press shutdown function (emergency shutdown)
PMU.disableLongPressShutdown(); PMU.enableLongPressShutdown();
// Get charging target current // Get charging target current