From c00f7c15f6868c129dee2a093d09f5afa7edec64 Mon Sep 17 00:00:00 2001 From: payton Date: Fri, 12 Jan 2024 17:44:45 +0800 Subject: [PATCH] =?UTF-8?q?1.emmc=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cardv/SrcCode/UIApp/MovieFast/MovieFast.c | 61 +++++++++++++------ .../cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c | 43 ++++++++----- 2 files changed, 69 insertions(+), 35 deletions(-) diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c index d5b91069f..cd9c1df6d 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -895,25 +895,37 @@ static DCF_HANDLE MovieFast_Get_DCF_Handle(void) } INT32 MovieFast_Wait_FileSys(UINT32 timeout_ms) { - DCF_HANDLE handle = MovieFast_Get_DCF_Handle(); - BOOT_INIT boot_init = BOOT_INIT_INVALID; +// DCF_HANDLE handle = MovieFast_Get_DCF_Handle(); +// BOOT_INIT boot_init = BOOT_INIT_INVALID; - if(handle == g_dcf_hdl){ - boot_init = BOOT_INIT_FILESYSOK; - } -#if (FS_MULTI_STRG_FUNC) - else if(handle == g_dcf_hdl2){ - boot_init = BOOT_INIT_FILESYSOK_2; - } -#endif +// if(handle == g_dcf_hdl){ +// boot_init = BOOT_INIT_FILESYSOK; +// } +// #if (FS_MULTI_STRG_FUNC) +// else if(handle == g_dcf_hdl2){ +// boot_init = BOOT_INIT_FILESYSOK_2; +// } +// #endif - if(boot_init != BOOT_INIT_INVALID) - return fastboot_wait_done_timeout(boot_init, timeout_ms); - else{ - DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); +// if(boot_init != BOOT_INIT_INVALID) +// return fastboot_wait_done_timeout(boot_init, timeout_ms); +// else{ +// DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); +// return E_SYS; +// } + INT32 ret = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, timeout_ms); + INT32 ret2 = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, timeout_ms); + +// E_OK + if(ret == E_OK && ret2 == E_OK) + { + return E_OK; + } + else { + DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); return E_SYS; - } + } } INT32 MovieFast_Wait_FileNaming(UINT32 timeout_ms) @@ -1249,6 +1261,7 @@ static void MovieFast_UserEventCb(UINT32 id, MOVIE_USER_CB_EVENT event_id, UINT3 while (lfqueue_enq(&write_queue, (void*) param) == -1) { DBG_ERR("ENQ Full ?\r\n"); + vos_util_delay_ms(5); } } else{ @@ -1343,8 +1356,13 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread(void *arg) .WorkbuffSize = POOL_SIZE_DCF_BUFFER, }; - fastboot_wait_done(BOOT_INIT_FILESYSOK); - + //fastboot_wait_done(BOOT_INIT_FILESYSOK); + if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK) + { + fastboot_msg_en(ENABLE); + DBG_ERR(" FILESYS TIMEOUT failed\r\n"); + THREAD_RETURN(1); + } MovieFast_FileNaming_Init(); if(g_dcf_hdl == -1){ @@ -1381,8 +1399,13 @@ THREAD_RETTYPE MovieFast_InitFileNamingThread2(void *arg) .WorkbuffSize = POOL_SIZE_DCF_BUFFER, }; - fastboot_wait_done(BOOT_INIT_FILESYSOK_2); - + //fastboot_wait_done(BOOT_INIT_FILESYSOK_2); + if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK) + { + fastboot_msg_en(ENABLE); + DBG_ERR(" BOOT_INIT_FILESYSOK_2 TIMEOUT failed\r\n"); + THREAD_RETURN(1); + } MovieFast_FileNaming_Init(); if(g_dcf_hdl2== -1){ diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c index 3a339f6c2..0e7dc3703 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c @@ -969,25 +969,36 @@ DCF_HANDLE PhotoFast_Get_DCF_Handle() } INT32 PhotoFast_Wait_FileSys(UINT32 timeout_ms) { - DCF_HANDLE handle = PhotoFast_Get_DCF_Handle(); - BOOT_INIT boot_init = BOOT_INIT_INVALID; +// DCF_HANDLE handle = PhotoFast_Get_DCF_Handle(); +// BOOT_INIT boot_init = BOOT_INIT_INVALID; - if(handle == g_dcf_hdl){ - boot_init = BOOT_INIT_FILESYSOK; - } -#if (FS_MULTI_STRG_FUNC) - else if(handle == g_dcf_hdl2){ - boot_init = BOOT_INIT_FILESYSOK_2; - } -#endif +// if(handle == g_dcf_hdl){ +// boot_init = BOOT_INIT_FILESYSOK; +// } +// #if (FS_MULTI_STRG_FUNC) +// else if(handle == g_dcf_hdl2){ +// boot_init = BOOT_INIT_FILESYSOK_2; +// } +// #endif + INT32 ret = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, timeout_ms); + INT32 ret2 = fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK_2, timeout_ms); - - if(boot_init != BOOT_INIT_INVALID) - return fastboot_wait_done_timeout(boot_init, timeout_ms); - else{ - DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); +// E_OK + if(ret == E_OK && ret2 == E_OK) + { + return E_OK; + } + else { + DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); return E_SYS; - } + } + + // if(boot_init != BOOT_INIT_INVALID) + // return fastboot_wait_done_timeout(boot_init, timeout_ms); + // else{ + // DBG_ERR("boot_init = BOOT_INIT_INVALID\n"); + // return E_SYS; + // } } INT32 PhotoFast_Wait_FileNaming(UINT32 timeout_ms)