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

📄 ufi.h

📁 基于c8051F320的优盘制作代码及原理图
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////////////////
//USB MASS STORAGE SCSI Command Class UFI
///////////////////////////////////////////////////////////////////////////////////////////
#define			Format_Unit			0x04
#define			Inquiry				0x12
#define			Start_Stop			0x1B
#define			Mode_Select			0x55
#define			Mode_Sense10		0x5A
#define			Mode_Sense6			0x1A
#define			Prevent_Allow		0x1E
#define			Read_10				0x28
#define			Read_12				0xA8
#define			Read_Cap			0x25
#define			Read_Format			0x23
#define			Requst_Sense		0x03
#define			Rezero_Unit			0x01
#define			Seek_10				0x2B
#define			Send_Diag			0x1D
#define			Test_Ready			0x00
#define			Verify				0x2F
#define			Write_10			0x2A
#define			Write_12			0xAA
#define			Write_Verify		0x2E


//Define Data Structure of the UFI class
typedef		struct	_CBW
{
	ulong	CBWSignature;				//Signature is 0x43425355 forever
	ulong	CBWTag;						//Device must return the Tag to the Host
	ulong	CBWDataLength;				//Required Data Length
	uchar	CBWFlag;					//BIT7 0: host out, 1 host in
	uchar	CBWLun;						//Logic	Unit Number
	uchar	CBWCBLength;				//Record the CBWCB length
	uchar	CBWCB[16];					//CBWCB Content


}	CBW,	*pCBW;

typedef		struct	_CSW
{
	ulong	CSWSignature;				//CSW's Signature is always 0x53425355
	ulong	CSWTag;						//same with the CBWTag
	ulong	CSWDataLength;				//data length
	uchar	CSWStatus;					// 0 stand for OK, 1 for error



}	CSW,	*pCSW;

⌨️ 快捷键说明

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