From a30c6452c86b8fbf3555e4469e1357bc34adb1cc Mon Sep 17 00:00:00 2001 From: payton Date: Fri, 25 Aug 2023 15:27:27 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96=E5=88=B0?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=A8=A1=E5=BC=8F=E6=97=B6=E5=85=B3=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/lib/source/sifar/code/source/common/sf_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 5e6d8b42a..1ce29593b 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -1518,12 +1518,20 @@ static const SF_CHAR* sf_process_message_getstatusstring(SF_MESSAGE_TYPE_E enTyp static SINT32 sf_cardv_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf) { static UINT8 wifistart = 0; + UINT8 powerOnMode = 0; + //printf("[%s:%d] ID = %#x\n", __FUNCTION__, __LINE__,pMessageBuf->arg1); //SF_MESSAGE_BUF_S stMessageBuf = {0}; MLOGI("ID = %#x\n",pMessageBuf->arg1); switch(pMessageBuf->arg1) { case SF_MCU_CMD_POWERON: + powerOnMode = sf_cardv_convert_power_on_mode(); + if(pMessageBuf->arg2 != powerOnMode) + { + MLOGE("err get powerOnMode:%d powerOnMode:%d\n",pMessageBuf->arg2, powerOnMode); + Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_NORMAL); + } sf_set_power_on_mode(pMessageBuf->arg2); sf_mcu_set_irshtter(pMessageBuf->arg3); break;