📄 osfile.h
字号:
** Function name: OSGetFileOffset
** Descriptions: 获得文件当前读写位置位置
** input parameters: Handle:文件句柄
** err:用于返回出错信息
** Returned value: 文件位置(偏移量)
** *err: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSGetDrive(char *Path);
/*********************************************************************************************************
** Function name: OSGetDrive
** Descriptions: 获取指定目录的驱动器
** input parameters: Path:路径名
** Returned value: 驱动器号
********************************************************************************************************/
extern uint8 OSChangeDrive(char *Drive);
/*********************************************************************************************************
** Function name: OSChangeDrive
** Descriptions: 改变当前逻辑盘
** input parameters: Drive:逻辑盘符字符串
** Returned value: RETURN_OK:成功
** NOT_FIND_DISK:逻辑盘不存在
** PARAMETER_ERR:非法参数
********************************************************************************************************/
extern uint8 OSChangeDir(char *Path);
/*********************************************************************************************************
** Function name: OSChangeDir
** Descriptions: 改变当前目录
** input parameters: Path:路径名
** Returned value: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSMakeDir(char *Path);
/*********************************************************************************************************
** Function name: OSMakeDir
** Descriptions: 建立目录
** input parameters: Path:路径名
** Returned value: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSRemoveDir(char *Path);
/*********************************************************************************************************
** Function name: OSRemoveDir
** Descriptions: 删除目录
** input parameters: Path:路径名
** Returned value: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSmount(char *DriveName);
/*********************************************************************************************************
** Function name: OSmount
** Descriptions: 加载卷(已分配盘符),允许读写
** input parameters: DriveName:包含逻辑盘的字符串
** Returned value: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSumount(char *DriveName);
/*********************************************************************************************************
** Function name: OSumount
** Descriptions: 卸载卷(已分配盘符),禁止读写。
** input parameters: DriveName:包含逻辑盘的字符串
** Returned value: RETURN_OK:成功
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern void OSAddFileDriver(void *DiskCommand, void *RsvdForLow);
/*********************************************************************************************************
** Function name: OSAddFileDriver
** Descriptions: 增加物理盘
** input parameters: DiskCommand:驱动程序接口函数
** RsvdForLow:保留给底层的指针
********************************************************************************************************/
extern void OSRemoveFileDriver(void *DiskCommand, void *RsvdForLow);
/*********************************************************************************************************
** Function name: OSRemoveFileDriver
** Descriptions: 删除一个物理盘
** input parameters: DiskCommand:驱动程序接口函数
** RsvdForLow:保留给底层的指针
** Returned value: none
********************************************************************************************************/
extern void OSAllCacheWriteBack(void);
/*********************************************************************************************************
** Function name: OSAllCacheWriteBack
** Descriptions: 把所有已改变的扇区写回逻辑盘
** input parameters: none
** Returned value: none
********************************************************************************************************/
extern uint8 OSFindFirst(char *Name, char *Path);
/*********************************************************************************************************
** Function name: OSFindFirst
** Descriptions: 在指定目录查看第一个文件/目录名称
** input parameters: Name: 保存查到的文件/目录名称
** Path: 路径名称
** Returned value: FIND_FILE: 找到文件
** FIND_DIR: 找到目录
** FDT_EOF: 查找完毕
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern int32 OSFindNext(char *Name);
/*********************************************************************************************************
** Function name: OSFindNext
** Descriptions: 在指定目录查看下一个文件/目录名称
** input parameters: Name: 保存查到的文件/目录名称
** Returned value: FIND_FILE: 找到文件
** FIND_DIR: 找到目录
** FDT_EOF: 查找完毕
** 其它参考fat.h中关于返回值的说明
********************************************************************************************************/
extern uint8 OSChangeCodePage(char *EncodeFile, char *DecodeFile, char *StruprFile, uint8 CodeWidth);
/*********************************************************************************************************
** Function name: OSChangeCodePage
** Descriptions: 改变本地编码
** input parameters: EncodeFile: 本地编码到Unicode编码码表文件名
** DecodeFile: Unicode编码到本地编码码表文件名
** width: 本地编码字符宽度
** StruprFile: 本地字符小写转大写码表
** Returned value: TRUE: 成功
** FALSE: 失败
********************************************************************************************************/
extern char *OSStrupr(char *Str);
/*********************************************************************************************************
** Function name: OSStrupr
** Descriptions: 把字符串转换成大写
** input parameters: Str:字符串
** Returned value: Str
********************************************************************************************************/
extern uint8 OSFormat(char *DriveName, uint32 SecPerDisk, unsigned int BytsPerSec, unsigned int rsSecs);
/*********************************************************************************************************
** Function name: OSFormat
** Descriptions: 格式化逻辑卷
** input parameters: DriveName:包含驱动器名称的字符串驱动器
** SecPerDisk:逻辑盘包含扇区数
** BytsPerSec:扇区包含字节数目
** Returned value: TRUE:成功
** FALSE:失败
********************************************************************************************************/
extern void File_init(void);
/*********************************************************************************************************
** Function name: File_init
** Descriptions: 文件系统初始化
** input parameters: none
** Returned value: none
********************************************************************************************************/
extern void CFIDEInit(void);
/*********************************************************************************************************
** Function name: CFIDEInit
** Descriptions: CF卡IDE接口初始化
** input parameters: none
** Returned value: none
********************************************************************************************************/
extern void MassDriverIni(void);
/*********************************************************************************************************
** Function name: MassDriverIni
** Descriptions: 大容量设备驱动初始化,该函数在USB_Host_Stack_Initialize函数前调用
** Input:无
** Output :无
********************************************************************************************************/
extern void * GetUSBCommand(void);
/*********************************************************************************************************
** Function name: GetUSBCammand
** Descriptions: 获取U盘驱动程序地址
** input parameters: none
** Returned value: U盘驱动程序地址
********************************************************************************************************/
extern void * GetCFCommand(void);
/*********************************************************************************************************
** Function name: GetCFCommand
** Descriptions: 获取CF卡硬盘驱动程序地址
** input parameters: none
** Returned value: CF卡硬盘驱动程序地址
********************************************************************************************************/
extern void * GetFFSCommand(void);
/*********************************************************************************************************
** Function name: GetNandflashCommand
** Descriptions: 获取 512Byte 扇区的 NandFlash 驱动程序地址
** input parameters: none
** Returned value: 驱动程序地址
********************************************************************************************************/
extern void *GetLFFSCommand(void);
/*********************************************************************************************************
** Function name: GetLFFSCommand
** Descriptions: 获取 2K 扇区的 NandFlash 驱动程序地址(SAMSUNG芯片从128MByte开始全部为2K扇区)
** input parameters: none
** Returned value: 驱动程序地址
********************************************************************************************************/
extern void *GetFlashDriverInfo(void);
/*********************************************************************************************************
** Function name: GetFlashDriverInfo
** Descriptions: 获取K9F2808U0M芯片信息地址(16M)
** input parameters: none
** Returned value: 芯片信息结构体
********************************************************************************************************/
#ifdef __cplusplus
}
#endif
#endif
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -