|
求救!!那位高人认识这个文件是那家公司的FS文件系统和版本号?
[复制链接]
以前我公司的一个工程师在基于ARM9 2410上面整合的UCOS II和FS文件系统,但所有系统文件的原码都已经打包,只留了个API接口集合的头文件(如下),里面没有任何公司和版本信息,现在要基于该系统平台开发一新系统,但没有详细的平台使用信息,感觉无从下手,请高手们指点!!谢谢!
--------------------------------------------------------------------------------
头文件名:OSFile.H
--------------------------------------------------------------------------------
#ifndef __OSFILE_H__
#define __OSFILE_H__
#include "OSFileDefine.h"
#include "datatype.h"
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL (void*)0
#endif
#define OS_FILESYSTER_UCOSII 1
#ifdef OS_FILESYSTER_UCOSII
void TestFAT_ListAll(int nfspart);
int initOSFile(void);
int FormatFS(int nfspart);
int GetFS_Info(int nfspart, int *TotalSec, int *unusedSec, int *badSec);
int CloseOSFile(CNCFILE* pfile);
CNCFILE* OpenOSFile(int nfspart, char filename[], INT32U OpenMode);
INT32U ReadOSFile(CNCFILE* pfile,INT8U* ReadBuffer, INT32U nReadbyte);
INT32U LineReadOSFile(CNCFILE* pfile, char str[]);
INT32U LineReadOSFile_num(CNCFILE* pfile, char str[],int num) ;
INT8U WriteOSFile(CNCFILE* pfile,INT8U* WriteBuffer, INT32U nWriteyte);
INT32U SeekOSFile(CNCFILE* pfile ,INT32U nCurPos);
INT32U GetPosOSFile(CNCFILE* pfile);
INT8U DeleteOSFile(int nfspart, char filename[]);
INT8U RenameOSFile(int nfspart, char fromname[], char toname[]);
INT8U GetNextFileName(int nfspart, INT32U *filepos,char filename[]);
INT8U ListNextFileName(int nfspart, INT32U *filepos, char FileExName[],char filename[]);
INT8U CopyOSFile(char srcfile[], char decfile[], int nsrcfspart, int ndecfspart);
INT16U UnusedBlock(int nfspart);
INT8U SearchOSFile(int nfspart, char filename[]);
INT32U GetSizeOSFile(CNCFILE* pfile);
INT8U GetFileSize(int nfspart,char filename[],INT32U *filesize);
BOOLEAN ListNextFileNameAndSize(int nfspart, INT32U *filepos, char* filename,INT32U *filesize);
#else
CNCFILE* Fs_CreateFile(INT8U nfspart,INT8S *filename,INT8U CreateMode,void *puf);
CNCFILE* Fs_OpenFile(INT8U nfpart,INT8S *filename,INT8U OpenMode,void *puf,INT32U Lentch);
STATUS_CODE Fs_InitFile(void);
STATUS_CODE Fs_DeleteFile(INT8U nfspart,INT8S *filename);
STATUS_CODE Fs_WriteFile(INT8U nfspart,CNCFILE *pfile,INT8U *wBuffer,INT32U nLentch);
STATUS_CODE Fs_ReadFile(INT8U nfspart,CNCFILE *pfile,INT8U *rBuffer,INT32U nLentch);
STATUS_CODE Fs_CloseFile(INT8U nfspart,CNCFILE *pfile);
STATUS_CODE Fs_RenameFile(INT8U nfspart,INT8S *OldFileName,INT8S *NewFileName);
STATUS_CODE Fs_SeekFile(INT8U nfspart,CNCFILE *pfile,INT8U seekmode,INT32S offset);
STATUS_CODE Fs_GetFileSize(INT8U nfspart,INT8S *filename, INT32U FileSize);
STATUS_CODE Fs_GetFileAttribute(INT8U nfspart,INT8S *filename, INT8U Attri);
STATUS_CODE Fs_SetFileAttribute(INT8U nfspart,INT8S *filename, INT8U Attri);
STATUS_CODE Fs_UnUseClusterCount(INT8U nfspart,INT16U Count);
#endif
#endif
--------------------------------------------------------------------------------------------
头文件名:Fs_config.h
--------------------------------------------------------------------------------------------
#ifndef __Fs_Config_h__
#define __Fs_Config_h__
#include "os_cpu.h"
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL (void*)0
#endif
#define OS_MULTITASK_UCOSII 1
#define OS_FILESYSTER_UCOSII 1
#define Block_Size (16*1024)
#define USE_CLUSTER_ID 0
#define PIECE_CLUSTER_ID 0xfff5
#define ERROR_CLUSTER_ID 0xfff6
#define BAD_CLUSTER_ID 0xfff7
#define END_CLUSTER_ID 0xfff8
#define USEING_DATA_CLUSTER 0xffbb
#define FREE_DATA_CLUSTER 0xffff
#define FLASH_DATA_CLUSTER 0xbbbb
#define DATA_UPDATA 0xbb
#define CURRET_CONTENT_ID 0xaa55ff
#define OLD_CONTENT_ID 0xaa55cc
#define UNUSE_CONTENT_ID 0xaaffff
#define FORMAT_FLAG 0xaa
#define CUREET_ROOT_FLAG 0x55
#define OLD_ROOT_FLAG 0xcc
#define FS_SEEK_SET 0
#define FS_SEEK_CURRENT 1
#define FS_SEEK_END 2
#define FS_OPEN_R 1
#define FS_OPEN_W 2
#define FS_OPEN_RW 3
#define FILE_ATTRIBUTE_READONLY 0x01
#define FILE_ATTRIBUTE_HIDDEN 0x02
#define FILE_ATTRIBUTE_SYSTEM 0x04
#define FILEMODE_READ 1
#define FILEMODE_WRITE 2
#define FILEMODE_CREATE 0x10
#define FILEMODE_MODIFY 0x20
#ifdef OS_FILESYSTER_UCOSII
typedef struct{
INT8S filename[11];
INT8U *FileBuffer;
INT8U Buffer[Block_Size];
INT8U filemode;
INT8U type;
INT8U exist;
INT16U filenumber;
INT16U fileCluster;
INT32U filecurpos;
INT32U filebufnum;
INT32U filesize;
INT32U filenextblock;
INT16U dataclusterpos;
INT16U npartition;
}CNCFILE;
#else
typedef struct{
INT8S filename[11];
INT8U *FileBuffer;
INT8U filemode;
INT8U type;
INT8U exist;
INT16U filenumber;
INT16U fileCluster;
INT32U filecurpos;
INT32U filesize;
}CNCFILE;
#endif
typedef enum
{
OPERATION_SUCCESS,
OPERATION_FALSE,
OK_CLUSTER,
BAD_CLUSTER,
INIT_FILE_SUCCESS,
INIT_FILE_FALSE,
WRITE_FILE_FALSE,
WRITE_FILE_SUCCESS,
READ_FILE_FALSE,
READ_FILE_SUCCESS,
CLOSE_FILE_FALSE,
CLOSE_FILE_SUCCESS,
DEL_FILE_FALSE,
DEL_FILE_SUCCESS,
RENAME_FILE_FALSE,
RENAME_FILE_SUCCESS,
SEEK_FILE_FALSE,
SEEK_FILE_SUCCESS,
ATTRIBUTE_FALSE,
ATTRIBUTE_SUCCESS,
FILE_SIZE_FALSE,
FILE_SIZE_SUCCESS,
UNUSER_CLUSTER_FALSE,
UNUSER_CLUSTER_SUCCESS,
}STATUS_CODE;
#endif
-----------------------------------------------------------------------------------------
|
|