1.Wait优化
This commit is contained in:
parent
00133b425d
commit
407e190db8
|
@ -1175,7 +1175,7 @@ static void MovieFast_WriteFile_Task(void* arg)
|
|||
lfqueue_t* queue = (lfqueue_t*)arg;
|
||||
MOVIEFAST_WRITE_QUEUE_PARAM* param;
|
||||
|
||||
MovieFast_Wait_FileSys(FASTBOOT_WAIT_FILESYS_TIMEOUT_MS);
|
||||
PhotoFast_Wait_FileSys(FASTBOOT_WAIT_FILESYS_TIMEOUT_MS);
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
if(TRUE == sf_is_card_full() && TRUE == sf_is_emmc_full())
|
||||
{
|
||||
|
@ -1387,7 +1387,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3
|
|||
case MOVIE_USER_CB_EVENT_FILENAMING_EMR_CB: {
|
||||
CHAR *pFileName = (CHAR *) value;
|
||||
|
||||
if(MovieFast_Wait_FileSys(FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) == E_OK && MovieFast_Wait_FileNaming(FASTBOOT_WAIT_FILENAMING_TIMEOUT_MS) == E_OK){
|
||||
if(PhotoFast_Wait_FileSys(FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) == E_OK && PhotoFast_Wait_FileNaming(FASTBOOT_WAIT_FILENAMING_TIMEOUT_MS) == E_OK){
|
||||
MovieFast_FileNamingCB(id, pFileName);
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -981,8 +981,14 @@ INT32 PhotoFast_Wait_FileSys(UINT32 timeout_ms)
|
|||
// boot_init = BOOT_INIT_FILESYSOK_2;
|
||||
// }
|
||||
// #endif
|
||||
INT32 ret = E_SYS;
|
||||
static INT32 ret = E_SYS;
|
||||
static int flag = 0;
|
||||
|
||||
if(flag)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
flag = 1;
|
||||
if(gpio_getPin(GPIO_CARD_DETECT) == 0)
|
||||
{
|
||||
//DBG_WRN("BOOT_INIT_FILESYSOK\n");
|
||||
|
@ -993,13 +999,13 @@ INT32 PhotoFast_Wait_FileSys(UINT32 timeout_ms)
|
|||
//DBG_WRN("ret1:%d, ret2:%d\n", ret, ret2);
|
||||
if(ret == E_OK || ret2 == E_OK)
|
||||
{
|
||||
return E_OK;
|
||||
ret = E_OK;
|
||||
}
|
||||
else {
|
||||
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
|
||||
return E_SYS;
|
||||
ret = E_SYS;
|
||||
}
|
||||
|
||||
return ret;
|
||||
// if(boot_init != BOOT_INIT_INVALID)
|
||||
// return fastboot_wait_done_timeout(boot_init, timeout_ms);
|
||||
// else{
|
||||
|
@ -1011,8 +1017,16 @@ INT32 PhotoFast_Wait_FileSys(UINT32 timeout_ms)
|
|||
INT32 PhotoFast_Wait_FileNaming(UINT32 timeout_ms)
|
||||
{
|
||||
//DCF_HANDLE handle = MovieFast_Get_DCF_Handle();
|
||||
static INT32 ret = E_SYS;
|
||||
static int flag = 0;
|
||||
BOOT_INIT boot_init = BOOT_INIT_INVALID;
|
||||
|
||||
if(flag)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
flag = 1;
|
||||
|
||||
SF_RTOS_ST_MMC_DEV *mmc_dev = SF_RtosStrgCheckWorkableDev();
|
||||
if(mmc_dev ==NULL)
|
||||
{
|
||||
|
@ -1033,12 +1047,13 @@ INT32 PhotoFast_Wait_FileNaming(UINT32 timeout_ms)
|
|||
|
||||
if(boot_init != BOOT_INIT_INVALID)
|
||||
{
|
||||
return fastboot_wait_done_timeout(boot_init, timeout_ms);
|
||||
ret = fastboot_wait_done_timeout(boot_init, timeout_ms);
|
||||
}
|
||||
else{
|
||||
DBG_ERR("boot_init = BOOT_INIT_INVALID\n");
|
||||
return E_SYS;
|
||||
ret = E_SYS;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
INT32 PhotoFast_WriteFile(UINT32 Addr, UINT32 Size, UINT32 Fmt, UINT32 uiPathId, char* Path)
|
||||
|
|
Loading…
Reference in New Issue
Block a user