fatdef.h
来自「一个小型的FAT文件系统,支持FAT12/16和目录」· C头文件 代码 · 共 63 行
H
63 行
#ifndef _FATDEF_H
#define _FATDEF_H
#include "type.h"
#include "fat.h"
/********************************************************************************
USER CONFIGURATION
********************************************************************************/
#define DEFAULT_YEAR 2002
#define DEFAULT_MONTH 1
#define DEFAULT_DAY 1
#define DEFAULT_HOUR 0
#define DEFAULT_MINUTE 0
#define DEFAULT_SECOND 0
#define CACHE_NUM 10
/* need re-compile */
#define OS_SUPPORT 0
/********************************************************************************
TYPE DEFINE
********************************************************************************/
typedef struct driver_api {
int (*init)(void);
int (*read)(ULONG, USHORT, UCHAR*);
int (*write)(ULONG, USHORT, UCHAR*);
}DRIVER_API;
typedef struct cache_res {
UCHAR use_flag :1;
UCHAR write_flag :1;
UCHAR drive;
ULONG sector;
UCHAR buffer[SECTOR_SIZE];
char next;
}CACHE_RES;
typedef struct fat_cfg {
USHORT year;
UCHAR month;
UCHAR day;
UCHAR hour;
UCHAR minute;
UCHAR second;
UCHAR cacheNum;
}FAT_CFG;
extern const DRIVER_API driverAPI[];
extern CACHE_RES cacheRes[];
extern const FAT_CFG fatConfig;
#endif /* _FATDEF_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?