Fix long-press power to soft-off instead of MCU reset.
PowerOff was calling nvic_system_reset after cutting rails, and boot auto power-on made it look like a restart. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
39954589e8
commit
c16a13edc3
|
|
@ -220,15 +220,14 @@ static void PowerOff(void)
|
|||
app_tm1629_all_off();
|
||||
|
||||
app_tm1617_off();
|
||||
/* 关闭电源硬件 */
|
||||
/* 关闭电源硬件;MCU 保持运行以便长按开机 / 关机充电画面 */
|
||||
BSP_MainPowerEnable(0);
|
||||
BSP_DreamCorePowerEnable(0);
|
||||
BSP_HT7178PowerEnable(0);
|
||||
BSP_BlueToothPowerEnable(0);
|
||||
LOG_I("PWR", "reset");
|
||||
__disable_irq();
|
||||
nvic_system_reset();
|
||||
//MainTask_Sendmsg(MSG_ID_POWER_OFF,0,0,0);
|
||||
CurrUIProcress = IdleProcess;
|
||||
MainTask_Sendmsg(MSG_ID_POWER_OFF, 0, 0, 0);
|
||||
LOG_I("PWR", "power_off done (soft-off, no reset)");
|
||||
}
|
||||
|
||||
void Power_Key_Scan()
|
||||
|
|
|
|||
Loading…
Reference in New Issue