⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fs52readdir.c

📁 我今天开始上传5份TI、NXP、MTK的手机开发全套资料。希望对大家有很大的帮助
💻 C
字号:
#ifdef FSS_FTR#define ACCESS_RIGHTS_INTERNAL_FS#define FS52READDIR_C#include "Fs.h"#undef  FILE_NUMBER#define FILE_NUMBER 52 void Fs52_01ReadDir( void * pp_Param ){   register t_FsCmdReadDir * 	pl_Param = (t_FsCmdReadDir *) pp_Param;   register ascii * 		pl_DirName = NIL; /* If end of file is = NIL */      register t_fsDIR *		pl_DirPtr = pl_Param->p_DirPtr;	   u8 				vl_Found;/* #ifdef FS_DEBUG  */    /* Verify if  dir pointer point on a dir if not OK set an error */    MC_FS_CO_VERIFY_IF_IS_DIR_OF_ENTITY( pl_Param, pl_DirPtr );    if ( MC_FS_STATUS(pl_Param) != FS_OK ) return;/* #endif */    /* If end of file reached we return a null pointer */    if ( pl_DirPtr->v_PosStatus != FS_END_OF_FILE )     {	/* If directory pointer place name in open directory structure 	  	else at address given in directory entry pointer */        if ( pl_Param->p_DirectoryEntry == NIL ) pl_DirName =  &pl_DirPtr->a_DirName[0];	else pl_DirName = ( ascii *) pl_Param->p_DirectoryEntry;        /* Set the interlayer table pointer on new volume */        MC_FS_LL_SET_NEW_VOL(MC_FS_VD_GET_VOL_PTR_OF_DIR( pl_DirPtr ));   	/* Read next element through lower layers */   	MC_FS_LL_READDIR( pl_DirPtr->v_PosStatus, pl_DirPtr->p_FmPrivateDirInfo, 				pl_DirName, &vl_Found, &MC_FS_STATUS(pl_Param) );    	/* If element found set status to next and address of dirent structure to		the structure integrated in the fsDir structure */    	if (vl_Found && (MC_FS_STATUS(pl_Param) == FS_OK ))	{	    pl_DirPtr->v_PosStatus = FS_NEXT_ELEM;	}	     /* Not found -> end-of-file reached or error set position status to end of file */	else	{ 	    pl_DirPtr->v_PosStatus = FS_END_OF_FILE;	    pl_DirName = NIL;	}    }    /* Update directory entry pointer */    pl_Param->p_DirectoryEntry = (t_fss_dirent *) pl_DirName;}#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 2u32 Fs52_02ProcessReadDir( t_fsDIR * pp_DirPtr ){   /* Reserve space for message + space for dirent struct which is placed in message */   t_FsCmdReadDir * pl_ReadDir = 	(t_FsCmdReadDir *) MC_FS_GET_MEMORY(sizeof(t_FsCmdReadDir) + sizeof(t_fss_dirent));    /* Fill message with input parameters */    pl_ReadDir->p_DirPtr = pp_DirPtr;    /* Updates directory entry pointer on in message structure 	( if p_DirectoryEntry is different of NIL dirent data is placed at this address 	else in t_FsDir structure ( function interface ) */    pl_ReadDir->p_DirectoryEntry = &(pl_ReadDir->s_DirectoryEntry);    /* Send message by setting operation and return command identifier */    return( MC_FS_MA_SEND_CMD_MSG_TO_FS(FS_WITH_ACK, (void*)pl_ReadDir,FS_CMD_READDIR_REQ));}#endif /* FSS_FTR */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -