⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flsystem.h

📁 Linux下msys公司提供的doc2000的驱动源代码
💻 H
字号:
#ifndef FLSYSTEM_H#define FLSYSTEM_H#include "flcustom.h"#ifdef TFFS_ACCESS_MACROS# include "tffsdrv.h"#if (TFFS_SVER<60000)# undef BLOCK_SIZE#endif#endif#if defined(TFFS_USE_LIB)/* I don't want to include <types.h> */# ifndef NULL#  define NULL	((void*)0)# endif# ifndef _SIZE_T#  define _SIZE_Ttypedef unsigned long size_t;# endif#endif#include "lnx2tffs.h"#define FAR_LEVEL	0#define NAMING_CONVENTION	/* can't be changed */#define FL_PACKED_STRUCTURES __attribute__ ((packed))/* tffs debugging messages */#ifdef TFFS_MESSAGES_ENABLEDextern short fl_debug;# if (TFFS_SVER<60000)#  define DEBUG_PRINT(str)				if(fl_debug){LnxTffsPrint str ;}#  define DFORMAT_PRINT(star)# else	/* TFFS_SVER<60000 */#  define DBG_PRINT_FLOW(zone,str)		if(fl_debug&4){LnxTffsPrint(str);}#  define DBG_PRINT_WRN(zone,str)		if(fl_debug&2){LnxTffsPrint(str);}#  define DBG_PRINT_ERR(zone,str)		if(fl_debug&1){LnxTffsPrint(str);}#  define DBG_PRINT_FLOW_PRM(zone,str)	if(fl_debug&4){LnxTffsPrint str;}#  define DBG_PRINT_WRN_PRM(zone,str)	if(fl_debug&2){LnxTffsPrint str;}#  define DBG_PRINT_ERR_PRM(zone,str)	if(fl_debug&1){LnxTffsPrint str;}# endif	/* TFFS_SVER<60000 */#else /* TFFS_MESSAGES_ENABLED */# if (TFFS_SVER<60000)#  define DEBUG_PRINT(str)#  define DFORMAT_PRINT(star)# else	/* TFFS_SVER<60000 */#  define DBG_PRINT_FLOW(zone,str)#  define DBG_PRINT_WRN(zone,str)#  define DBG_PRINT_ERR(zone,str)#  define DBG_PRINT_FLOW_PRM(zone,str)#  define DBG_PRINT_WRN_PRM(zone,str)#  define DBG_PRINT_ERR_PRM(zone,str)# endif	/* TFFS_SVER<60000 */#endif /* TFFS_MESSAGES_ENABLED *//* tffs chain debugging messages */#define FL_FOPEN#define FL_FCLOSE#define FL_FPRINTF#define FL_MALLOC			LnxMalloc#define FL_FREE				LnxFree/* the function called when tffs released, i.e. on rmmod */#define FL_SYS_FUNC_RELEASE LnxSysfunRelease()/* the io memory mapped in flSysfunInit and released in LnxSysfunRelease, so don't touch the follow */#define physicalToPointer(physical,size,drive)	((void *) (physical))#define addToFarPointer(base,increment)			((void *) ((unsigned char *) (base) + (increment)))#define freePointer(ptr,size)#if (TFFS_SVER < 60000)# define pointerToPhysical(ptr)					((unsigned long)(ptr))#endif/* customization for RAM (not iomem) mem... functions */#if (TFFS_SVER<60000)# define flcpy					LnxMemcpy# define flcmp					LnxMemcmp# define flset					LnxMemset#elif (TFFS_SVER<61000)# define tffsRAMcpy				LnxMemcpy# define tffsRAMcmp				LnxMemcmp# define tffsRAMset				LnxMemset#else# define tffscpy				LnxMemcpy# define tffscmp				LnxMemcmp# define tffsset				LnxMemset#endif	/* TFFS_SVER>=61000 *//* customization for iomem functions */#define FLWRITE_IO_BYTE(val,address)		LnxWriteb((unsigned char)(val),(volatile unsigned char*)(address))#define FLWRITE_IO_WORD(val,address)		LnxWritew((unsigned short)(val),(volatile unsigned short*)(address))#define FLWRITE_IO_DWORD(val,address)		LnxWritel((unsigned long)(val),(volatile unsigned long*)(address))#define FLREAD_IO_BYTE(address)				LnxReadb((volatile unsigned char*)(address))#define FLREAD_IO_WORD(address)				LnxReadw((volatile unsigned short*)(address))#define FLREAD_IO_DWORD(address)			LnxReadl((volatile unsigned long*)(address))#if (TFFS_SVER<60000)# define FLCPY_TO_IO(dest,src,count)		LnxMemcpy_toio((void*)(dest),src,count)# define FLSET_IO(dest,val,count)			LnxMemset_io((void*)(dest),val,count)# define FLCPY_FROM_IO(dest,src,count)		LnxMemcpy_fromio(dest,(void*)(src),count)# define TFFSCPY_FROM_IO(dest,src,count)	LnxMemcpy_fromio(dest,(void*)(src),count)# define TFFSCPY_TO_IO(dest,src,count)		LnxMemcpy_toio((void*)(dest),src,count)# define TFFSSET_IO(dest,val,count)			LnxMemset_io((void*)(dest),val,count)#else	/* TFFS_SVER<60000 */# define TFFSCPY_FROM_IO_8_BITS(dest,src,count)		LnxMemcpy_fromio(dest,(void*)(src),count)# define TFFSCPY_FROM_IO_16_BITS(dest,src,count)	LnxMemcpy_fromio(dest,(void*)(src),count)# define TFFSCPY_TO_IO_8_BITS(dest,src,count)		LnxMemcpy_toio((void*)(dest),src,count)# define TFFSCPY_TO_IO_16_BITS(dest,src,count)		LnxMemcpy_toio((void*)(dest),src,count)# define TFFSSET_IO_8_BITS(dest,val,count)			LnxMemset_io((void*)(dest),val,count)# define TFFSSET_IO_16_BITS(dest,val,count)			LnxMemset_io((void*)(dest),val,count)#endif	/* TFFS_SVER<60000 */#endif /* FLSYSTEM_H */

⌨️ 快捷键说明

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