1.3启动时Linux下减少读mcu

This commit is contained in:
payton 2023-07-11 16:50:10 +08:00
parent 1c91a9bfe6
commit eb933a3ddd
2 changed files with 9 additions and 4 deletions

View File

@ -183,7 +183,7 @@ int main(int argc, char *argv[])
UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
printf("[%s:%d] CamMode:%d\n", __FUNCTION__, __LINE__,puiPara->CamMode); printf("[%s:%d] CamMode:%d\n", __FUNCTION__, __LINE__,puiPara->CamMode);
if(!isUsb) if((!isUsb) && (SF_MCU_STARTUP_NORMAL != startup))
{ {
//sf_usb_mux_s(1); //sf_usb_mux_s(1);
//sf_load_ko(); //sf_load_ko();

View File

@ -717,14 +717,19 @@ static SINT32 sf_app_proccess_cmd_mcu(SF_MESSAGE_BUF_S *pMessageBuf)
{ {
MLOGD("ID = %#x\n",pMessageBuf->arg1); MLOGD("ID = %#x\n",pMessageBuf->arg1);
SF_MESSAGE_BUF_S stMessageBuf = {0}; SF_MESSAGE_BUF_S stMessageBuf = {0};
SINT16 startup = 0;
switch(pMessageBuf->arg1) switch(pMessageBuf->arg1)
{ {
case SF_MCU_CMD_POWERON: case SF_MCU_CMD_POWERON:
sf_get_power_on_mode(); startup = sf_poweron_type_get();
if(SF_MCU_STARTUP_NORMAL != startup){
sf_get_power_on_mode();
stMessageBuf.arg3 = (SINT32)sf_mcu_get_irshtter();
}
stMessageBuf.arg1 = SF_MCU_CMD_POWERON; stMessageBuf.arg1 = SF_MCU_CMD_POWERON;
stMessageBuf.arg2 = (SINT32)sf_poweron_type_get(); stMessageBuf.arg2 = (SINT32)sf_poweron_type_get();
stMessageBuf.arg3 = (SINT32)sf_mcu_get_irshtter();
stMessageBuf.cmdId = CMD_MCU; stMessageBuf.cmdId = CMD_MCU;
sf_com_message_send_to_cardv(&stMessageBuf); sf_com_message_send_to_cardv(&stMessageBuf);