fs_fun.h

来自「凌阳SPCE3200 系统开发板随机自带源程序。共安排了32个子目录」· C头文件 代码 · 共 80 行

H
80
字号

#ifndef _FS_FUN_H_
#define _FS_FUN_H_

#include "..\SysLib_Basic\Sys_Global.h"
#include "..\SysLib_Basic\Sys_vfs.h"

#define MAXFILENUM	256

typedef struct{
	U32 ss			:6;
	U32 mm			:6;
	U32 hh			:5;
	U32 reserved	:15;
}SPG_Time;

typedef struct{
	U32 dd			:5;
	U32 mm			:4;
	U32 yy			:23;
}SPG_Date;

extern struct f_info g_stFileTbl[];				//note information of one type files(name,modify time&date,size)
extern U16 g_nFileNum;							//note the number of one type files
extern SPG_Time g_stFileTime;				//note modify time of an appointed file
extern SPG_Date g_stFileDate;				//note modify date of an appointed file

/**
 * FS_ListFile - list all files in the storage device according to wildcard
 * char *wildcard: the path and wildcard
 */
void FS_ListFile(char *wildcard);

/**
 * FS_GetFileName - get the name of the appointed file
 * U16 index: the index in the g_stFileTbl
 * RETURN: the pointer of name string
 *         NULL: no such file
 */
char* FS_GetFileName(U16 index);

/**
 * FS_GetModifyTime - get modify time of an appointed file
 * U16 index: the index in the g_stFileTbl
 */
void FS_GetModifyTime(U16 index);

/**
 * FS_GetModifyDate - get modify date of an appointed file
 * U16 index: the index in the g_stFileTbl
 */
void FS_GetModifyDate(U16 index);

/**
 * FS_GetFileSize - get the size of the appointed file
 * U16 index: the index in the g_stFileTbl
 * RETURN: file size(unit: Byte)
 *         0xffffffff: no such file
 */
unsigned long FS_GetFileSize(U16 index);

/**
 * FS_TotalSize - get the total size of storage device
 * RETURN: total size(unit: Byte)
 */
unsigned long FS_TotalSize(void);

/**
 * FS_FreeSize - get the free size of storage device
 * RETURN: free size(unit: Byte)
 */
unsigned long FS_FreeSize(void);

#endif	//_FS_FUN_H_





⌨️ 快捷键说明

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