📄 stdwrap.h
字号:
//file : stdwrap.h
#ifndef __STDWRAP_H__
#define __STDWRAP_H__
#include "stdio.h"
#include "fat16.h"
#include "fat16int.h"
#include "fat16_config.h"
#include "partition.h"
//#ifndef _SIZE_T_DEFINED
//#define _SIZE_T_DEFINED
//typedef unsigned long size_t;
//#endif
#define CFG_MaxEntryNameLen 32
#define CFG_MaxFile 3 //最多能打开的文件数
#define FPFLAG_Rd 0x01
#define FPFLAG_Wr 0x02
#define FPFLAG_Bin 0x04
#define FPFLAG_Inuse 0x80
struct partition_struct;
struct fat16_fs_struct;
struct fat16_file_struct;
struct fat16_dir_struct;
struct fat16_dir_entry_struct;
typedef struct _DS_CXFILE
{
struct fat16_fs_struct *pfs;
struct fat16_dir_struct *pdd;
struct fat16_file_struct *pfd;
UFAV flags; //若flags为0,表示该CXFILE变量没有被使用
}CXFILE;
typedef struct _DS_StdWrapCB
{
CXFILE fileAry[CFG_MaxFile];
}DS_StdWrapCB;
//>>>>>>>>>>>>>>>>>>>>>>>>暴露给应用程序的接口>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
CXFILE *cx_fopen(const char *pszFilePath, const char *pszIODesc);
int cx_fclose(CXFILE* fp);
size_t cx_fread(void *pvBuf, size_t unitSize, size_t unitCnt, CXFILE *fp);
size_t cx_fwrite(const void *pvBuf, size_t unitSize, size_t unitCnt, CXFILE *fp);
int cx_fseek(CXFILE *fp, long newPos, int rel);
long cx_ftell(CXFILE *fp);
int cx_feof(CXFILE *fp);
BOOL StdioWrapperStartup(void);
BOOL StdioWrapperCleanup(void);
BOOL StdWrap_Test(char *pPath);
//<<<<<<<<<<<<<<<<<<<<<<<暴露给应用程序的接口<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -