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

📄 fs80entitydata.c

📁 我今天开始上传5份TI、NXP、MTK的手机开发全套资料。希望对大家有很大的帮助
💻 C
📖 第 1 页 / 共 3 页
字号:
/*----------------------------------------------------------------------------*//*----------------------------------------------------------------------------*//*                                    DESCRIPTION                             *//*                                                                            *//* This primitive returns a pointer on the fs entity's control block 	      *//*        if the entity is not knowed from FS it's CB is created and 	      *//*        placed in the entity's address table and in the RTK -> FS           *//*        		translation table 				      *//*									      *//*----------------------------------------------------------------------------*//***************************************************************************)P*//* #*/#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 7t_fsEntityStruct *  Fs80_07EDGetEntityPtr( t_RtkID vp_RtkId ){   u16 vl_FsID;   /* Point on entity's address table */   t_fsEntityStruct ** pl_TabPtrEntity = s_EntityDataBaseStruct.p_EntityIndexedByFsId;    /* Translate the RTK ID in FS ID */    vl_FsID = Fs80_02EDGetFsId ( vp_RtkId );    /* return pointer on entity's structure this is in entity's table		at index 'FS index' */    return ( pl_TabPtrEntity[vl_FsID] ); }/**//*P(***************************************************************************//* Procedure name : Fs80_08EDInsertFileInEntity                               *//* Object :    Insert a new file in entity's opened files		      *//*----------------------------------------------------------------------------*//* Input parameters  :                                                        *//* -------------------                                                        *//*   t_fsEntityStruct * pp_Entity : pointer on entity's control block 	      *//*   t_fsFILE * pp_File      : Pointer on file structure		      *//*						    			      *//*									      *//* Output parameters :                                                        *//* -------------------                                                        *//*									      *//* Used variables    :                                                        *//* -------------------                                                        *//*   							                      *//*                                                                            *//* Used procedures   :                                                        *//* -------------------                                                        *//*                                                                            *//*                                                                            *//*----------------------------------------------------------------------------*//*----------------------------------------------------------------------------*//*                                    DESCRIPTION                             *//*                                                                            *//*      This function insert a new file in entity's open files list	      *//*									      *//*----------------------------------------------------------------------------*//***************************************************************************)P*//* #*/#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 8void Fs80_08EDInsertFileInEntity( t_fsEntityStruct * pp_Entity, t_fsFILE * pp_File ){  register t_fsFILE * pl_FileList = pp_Entity->p_FileList;   /* Point on entity's file list */   /* If list not empty update previous pointer of object in top of queue */   /* If list is not empty previous pointer of element in top of queue is to pdate */   if ( pl_FileList != 0 ) pl_FileList->p_EntityPrecPtr = pp_File;   /* Next pointers is set to pointer on linked list value */   pp_File->p_EntityNextPtr = pl_FileList;   /* Like the insert is in top of file previous pointer is set to 0 */   pp_File->p_EntityPrecPtr = 0;   /* pointer in entity structure point on the file structure */   pp_Entity->p_FileList = pp_File;   /* Note entity's CB address in File structure */   pp_File->p_Entity = pp_Entity;}/**//*P(***************************************************************************//* Procedure name : Fs80_09EDDeleteFileFromEntity                             *//* Object :    Delete a file from the opened file entity's opened files	list  *//*----------------------------------------------------------------------------*//* Input parameters  :                                                        *//* -------------------                                                        *//*   t_fsFILE * pp_File      : Pointer on file structure		      *//*						    			      *//*									      *//* Output parameters :                                                        *//* -------------------                                                        *//*									      *//* Used variables    :                                                        *//* -------------------                                                        *//*   							                      *//*                                                                            *//* Used procedures   :                                                        *//* -------------------                                                        *//*                                                                            *//*                                                                            *//*----------------------------------------------------------------------------*//*----------------------------------------------------------------------------*//*                                    DESCRIPTION                             *//*                                                                            *//*      This function insert a new file in entity's open files list	      *//*									      *//*----------------------------------------------------------------------------*//***************************************************************************)P*//* #*/#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 9void Fs80_09EDDeleteFileFromEntity( t_fsFILE * pp_File ){   t_fsEntityStruct * pl_Entity = (t_fsEntityStruct *) pp_File->p_Entity;   /* If object to delete in top of list updates list pointer else next pointer#			 of previous object */   if ( pp_File-> p_EntityPrecPtr == NIL ) pl_Entity->p_FileList = pp_File-> p_EntityNextPtr;   else pp_File-> p_EntityPrecPtr->p_EntityNextPtr = pp_File-> p_EntityNextPtr;   /* If object to delete not last of the queue updates previous pointer of next object */   if ( pp_File-> p_EntityNextPtr != NIL )       pp_File->p_EntityNextPtr->p_EntityPrecPtr = pp_File->p_EntityPrecPtr;}/**//*P(***************************************************************************//* Procedure name : Fs80_10EDInsertDirInEntity                                *//* Object :    Insert a new directory in entity's opened directories	      *//*----------------------------------------------------------------------------*//* Input parameters  :                                                        *//* -------------------                                                        *//*   t_fsEntityStruct * pp_Entity : pointer on entity's control block 	      *//*   t_fsDIR * pp_Dir      : Pointer on directory structure		      *//*						    			      *//*									      *//* Output parameters :                                                        *//* -------------------                                                        *//*									      *//* Used variables    :                                                        *//* -------------------                                                        *//*   							                      *//*                                                                            *//* Used procedures   :                                                        *//* -------------------                                                        *//*                                                                            *//*                                                                            *//*----------------------------------------------------------------------------*//*----------------------------------------------------------------------------*//*                                    DESCRIPTION                             *//*                                                                            *//*   This function insert a new directory in entity's open directories list   *//*									      *//*----------------------------------------------------------------------------*//***************************************************************************)P*//* #*/#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 10void Fs80_10EDInsertDirInEntity( t_fsEntityStruct * pp_Entity, t_fsDIR * pp_Dir ){  register t_fsDIR * pl_DirList = pp_Entity->p_DirList;   /* Point on entity's directories list */   /* If list not empty update previous pointer of object in top of queue */   /* If list is not empty previous pointer of element in top of queue is to pdate */   if ( pl_DirList != NIL ) pl_DirList->p_EntityPrecPtr = pp_Dir;   /* Next pointers is set to pointer on linked list value */   pp_Dir->p_EntityNextPtr = pl_DirList;   /* Like the insert is in top of file previous pointer is set to NIL */   pp_Dir->p_EntityPrecPtr = NIL;   /* pointer in entity structure point on the file structure */   pp_Entity->p_DirList = pp_Dir;   /* Note entity's CB address in Dir structure */   pp_Dir->p_Entity = pp_Entity;}/**//*P(***************************************************************************//* Procedure name : Fs80_11EDDeleteDirFromEntity                              *//* Object : Delete a directory from the opened dir entity's opened dir list   *//*----------------------------------------------------------------------------*//* Input parameters  :                                                        *//* -------------------                                                        *//*									      *//*   t_fsDIR * pp_Dir      : Pointer on directory's structure		      *//*						    			      *//*									      *//* Output parameters :                                                        *//* -------------------                                                        *//*									      *//* Used variables    :                                                        *//* -------------------                                                        *//*   							                      *//*                                                                            *//* Used procedures   :                                                        *//* -------------------                                                        *//*                                                                            *//*                                                                            *//*----------------------------------------------------------------------------*//*----------------------------------------------------------------------------*//*                                    DESCRIPTION                             *//*                                                                            *//*   This function insert a new directory in entity's open directories list   *//*									      *//*----------------------------------------------------------------------------*//***************************************************************************)P*//* #*/#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 11void Fs80_11EDDeleteDirFromEntity( t_fsDIR * pp_Dir ){   t_fsEntityStruct * pl_Entity = ( t_fsEntityStruct *) pp_Dir->p_Entity;   /* If object to delete in top of list updates list pointer else next pointer			 of previous object */   if ( pp_Dir-> p_EntityPrecPtr == 0 ) pl_Entity->p_DirList = pp_Dir-> p_EntityNextPtr;   else pp_Dir-> p_EntityPrecPtr->p_EntityNextPtr = pp_Dir-> p_EntityNextPtr;   /* If object to delete not last of the queue updates previous pointer of next object */   if ( pp_Dir-> p_EntityNextPtr != 0 )       pp_Dir->p_EntityNextPtr->p_EntityPrecPtr = pp_Dir->p_EntityPrecPtr;}#undef PROCEDURE_NUMBER #define PROCEDURE_NUMBER 11void Fs80_12EDInvalidCurrentDir( t_fsVolStruct * pp_Volume, u32 vp_DirID ){   t_fsEntityStruct ** 	pl_EntityTab = s_EntityDataBaseStruct.p_EntityIndexedByFsId;   u32			vl_NbrEntitys = s_EntityDataBaseStruct.v_NbrEntitys;   t_fsEntityStruct * 	pl_Entity;    while ( vl_NbrEntitys-- != 0 )    {	/* Point on entity's control block */	pl_Entity = * pl_EntityTab;	/* If in right volume directory exist and is equal to searched directory invalid 				the current path */	if ( ( pl_Entity -> p_CurrentVolume == pp_Volume)				&&	     ( pl_Entity -> v_DirLevelNExist == TRUE ) 				&&	     ( pl_Entity->v_CurrentDirIDLevelN == vp_DirID)) 			pl_Entity->v_CurrPathValid = FALSE;	/* Point on next entry in table */	pl_EntityTab++;    } }#endif /* FSS_FTR */

⌨️ 快捷键说明

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