From 04ffffa00406a1f23853cc892c9c20580e4a2343 Mon Sep 17 00:00:00 2001 From: "sober.song" Date: Wed, 3 Jan 2024 21:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9rtos=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtos/code/driver/na51089/source/mcu/sf_mcu.c | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/rtos/code/driver/na51089/source/mcu/sf_mcu.c b/rtos/code/driver/na51089/source/mcu/sf_mcu.c index 1cf9fbb39..4a7924fa8 100755 --- a/rtos/code/driver/na51089/source/mcu/sf_mcu.c +++ b/rtos/code/driver/na51089/source/mcu/sf_mcu.c @@ -38,6 +38,7 @@ #include "PrjCfg.h" #include "sf_battery.h" #include +#include static UINT8 McuSubVersion = 0; static UINT16 McuVersion = 0; static UINT8 DailyReportStartMode = 0; @@ -2172,21 +2173,21 @@ void sf_file_thumb_cfg_sava(void) INT32 ret_fs = 0; FST_FILE_STATUS FileStat; UIMenuStoreInfo *puiPara = sf_ui_para_get(); -#if USE_MMC_DEV_CHECK - - SF_ST_MMC_DEV *mmc_dev = SF_GetMMCDev(); - if(mmc_dev == NULL) - { - DBG_ERR("No MMC_Dev Can use!\n"); - return; - } - if(mmc_dev->dcf_handle < 0) - { - DBG_ERR("dcf_handle err!\n"); - return; - } +#if USE_RTOS_MMC_CHECK + SF_RTOS_ST_MMC_DEV *mmc_dev = SF_RtosStrgCheckWorkableDev(); + if(mmc_dev ==NULL) + { + DBG_ERR("No MMC_Dev Can use!\n"); + return; + } + if(mmc_dev->dcf_handle < 0) + { + DBG_ERR("dcf_handle err\n"); + return; + } #endif + if (pThumbFileCfg != NULL) { char sendListName[64] = {0}; @@ -2199,7 +2200,7 @@ void sf_file_thumb_cfg_sava(void) char tmp[64] = {'\0'}; INT32 uiStatus = 0; UINT8 ucAttrib = 0; -#if USE_MMC_DEV_CHECK +#if USE_RTOS_MMC_CHECK if(mmc_dev->dev_type == MMC_DEV_SD) { snprintf(tmp, sizeof(tmp), "%c%s", 'A', PHOTO_THUMB_PATH); @@ -2220,7 +2221,7 @@ void sf_file_thumb_cfg_sava(void) } #endif -#if USE_MMC_DEV_CHECK +#if USE_RTOS_MMC_CHECK if(mmc_dev->dev_type == MMC_DEV_SD) { if(0 == puiPara->SendType){