📄 fatdef.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -