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

📄 usb.equ

📁 dos下的USB源码(包括UHCI
💻 EQU
📖 第 1 页 / 共 5 页
字号:
	bSubClass	BYTE	?
	bProtocol	BYTE	?
	wFlags		WORD	?
stBadUSBDevice		ENDS

;<AMI_GHDR_START>
;----------------------------------------------------------------------------
; Name:		INCMPT_FLAGS (Incompatibility attributes)
;
; Type:		Equates
;
; Description:	This equates are used to describe the incompatible USB mass
;		storage devices. The bits defined are:
;		BIT		Description
;		=============================================================
;		0		1, indicates this device does not support mode sense command
;		1		1, indicates that this is a single LUN device (even though it is reporting as multiple LUN)
;		2		1, indicates that this device should be disabled
;		3		1, indicates this device does not support test unit ready command
;		4		1, indicates this device responds with wrong BOT status value
;		5		1, indicates that this device does not support start unit command
;		6		1, indicates that this device does not support read format capacity command
;		7		1, indicates that this hispeed device has to be in full speed always
;		8		1, indicates that this hispeed device has to be in hispeed always
;
; Notes:	The device is identified by the vendor id and device id
;		associated with the flags above
;
; Referrals:	stBadUSBDevice
;
;----------------------------------------------------------------------------
;<AMI_GHDR_END>

USB_INCMPT_MODE_SENSE_NOT_SUPPORTED		EQU	BIT0
USB_INCMPT_SINGLE_LUN_DEVICE			EQU	BIT1
USB_INCMPT_DISABLE_DEVICE			EQU	BIT2
USB_INCMPT_TEST_UNIT_READY_FAILED		EQU	BIT3
USB_INCMPT_BOT_STATUS_FAILED			EQU	BIT4
USB_INCMPT_START_UNIT_NOT_SUPPORTED		EQU	BIT5
USB_INCMPT_FORMAT_CAPACITY_NOT_SUPPORTED	EQU	BIT6
USB_INCMPT_KEEP_FULLSPEED			EQU	BIT7
USB_INCMPT_KEEP_HISPEED				EQU	BIT8

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		CK_PRESENCE
;
; Description:	This is a URP (USB Request Packet) structure for the BIOS
;		API call CheckPresence (API #0)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		wBiosRev	WORD	USB BIOS revision number
;		bBiosActive	BYTE	USB BIOS active/inactive status
;		bNumBootDev	BYTE	No. of USB boot device present
;		dUsbDataArea	DWORD	Current USB Data area (32bit)
;		bNumKeyboards	BYTE	Number of USB keyboards present
;		bNumMice	BYTE	Number of USB mice present
;		bNumHubs	BYTE	Number of USB hubs present
;		bNumStorage	BYTE	Number of USB storage devices present
;		bNumHarddisk	BYTE	Number of hard disk emulated USB devices
;		bNumCDROM	BYTE	Number of CDROM emulated USB devices
;		bNumFloppy	BYTE	Number of floppy emulated USB devices
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

CK_PRESENCE	STRUC
	wBiosRev	WORD	?		; USB BIOS Revision
	bBiosActive	BYTE	?		; USB BIOS active/inactive
	bNumBootDev	BYTE	?		; # of USB boot device
	dUsbDataArea	DWORD	?		; USB Data area
	bNumKeyboards	BYTE	?		; Number of USB keyboards present
	bNumMice	BYTE	?		; Number of USB mice present
	bNumHubs	BYTE	?		; Number of USB hubs present
	bNumStorage	BYTE	?		; Number of USB storage devices present
;;;;;;;;; DO NOT ADD ANY FIELD HERE. IF IT IS NECESSARY PLEASE UPDATE THE CODE
;;;;;;;;; IN THE FUNCTION USBWrap_GetDeviceCount in the file USBWRAP.ASM
	bNumHarddisk	BYTE	?		; Number of hard disk emulated USB devices
	bNumCDROM	BYTE	?		; Number of CDROM emulated USB devices
	bNumFloppy	BYTE	?		; Number of floppy emulated USB devices
CK_PRESENCE	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		START_HC
;
; Description:	This is a URP (USB Request Packet) structure for the BIOS
;		API call StartHC and MoveDataArea (API #20 & #24)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		wDataAreaFlag	WORD	Indicates which data area to use
;		dExtDataArea	DWORD	Extended data area location (0 if disabled)
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

START_HC	STRUC
	wDataAreaFlag	WORD	?		; Data area to use
	dExtDataArea	DWORD	?		; Extended data area address
START_HC	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		GET_DEV_INFO
;
; Description:	This is a URP (USB Request Packet) structure for the BIOS
;		API call GetDeviceInfo (API #25)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevNumber	BYTE	Device # whose info is requested
;		bHCNumber	BYTE	HC # to which this device is connected (0 if no such device found)
;		bDevType	BYTE	Device type (0 if no such device found)
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

GET_DEV_INFO	STRUC
	bDevNumber	BYTE	?
	bHCNumber	BYTE	?
	bDevType	BYTE	?
GET_DEV_INFO	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		CHK_DEV_PRSNC
;
; Description:	This is a URP (USB Request Packet) structure for the BIOS
;		API call CheckDevicePresence (API #26)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevType	BYTE	Type of device to look for
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

CHK_DEV_PRSNC	STRUC
	bDevType	BYTE	?
CHK_DEV_PRSNC	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_GET_DEV_INFO
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassGetDeviceInfo (API #27h, SubFunc 00h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;		bDevType	BYTE	Device type byte (HDD, CD, Removable)
;		bEmuType	BYTE	Emulation type used
;		fpDevId		DWORD	Far pointer to the device ID
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_GET_DEV_INFO	STRUC
	bDevAddr	BYTE	?		; (Return value)
	dSenseData	DWORD	?		; USB Sense data
	bDevType	BYTE	?		; Device type
	bEmuType	BYTE	?		; Emulation type
	fpDevId		DWORD	?		; Far ptr to the device id
;; DO NOT ADD OR DELETE ANY FIELD ABOVE - This should match the MASS_INQUIRY
;; structure for proper working
MASS_GET_DEV_INFO	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_GET_DEV_GEO
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassGetDeviceGeometry (API #27h,
;		SubFunc 01h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;		bNumHeads	BYTE	Number of heads
;		wNumCylinders	WORD	Number of cylinders
;		bNumSectors	BYTE	Number of sectors
;		bLBANumHeads	BYTE	Number of heads (for INT13h function 48h)
;		wLBANumCyls	WORD	Number of cylinders (for INT13h function 48h)
;		bLBANumSectors	BYTE	Number of sectors (for INT13h function 48h)
;		wBytesPerSector	WORD	Number of bytes per sector
;		bMediaType	BYTE	Media type
;		dLastLBA	DWORD	Last LBA address
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_GET_DEV_GEO	STRUC
	bDevAddr	BYTE	?		; (Return value)
	dSenseData	DWORD	?		; USB Sense data
	bNumHeads	BYTE	?
	wNumCylinders	WORD	?
	bNumSectors	BYTE	?
	bLBANumHeads	BYTE	?
	wLBANumCyls	WORD	?
	bLBANumSectors	BYTE	?
	wBytesPerSector	WORD	?
	bMediaType	BYTE	?
	dLastLBA	DWORD	?
MASS_GET_DEV_GEO	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_RESET
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassResetDevice (API #27h, SubFunc 02h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_RESET		STRUC
	bDevAddr	BYTE	?		; USB Device Address
	dSenseData	DWORD	?		; USB Sense data
MASS_RESET		ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_ASSIGN_DRIVE_NUM
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call USBMass_AssignDriveNumber
;		(API #27h, SubFunc 0Eh)
;
; Fields:	 Name		Type	Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		bLogDevNum	BYTE	Logical Drive Number to assign to the device
;		bHeads		BYTE	Number of heads
;		bSectors	BYTE	Number of sectors/track
;		wCylinders	WORD	Number of cylinders
;		wBlockSize	WORD	Sector size in bytes
;		bLUN		BYTE	Maximum LUNs in the system
;		bSpeed		BYTE	<>0 if the device is hi-speed device
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_ASSIGN_DRIVE_NUM	STRUC
	bDevAddr	BYTE	?	; USB Device Address
	bLogDevNum	BYTE	?	; Logical Drive Number to assign to the device
	bHeads		BYTE	?
	bSectors	BYTE	?
	wCylinders	WORD	?
	wBlockSize	WORD	?
	bLUN		BYTE	?
	bSpeed		BYTE	?
MASS_ASSIGN_DRIVE_NUM	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_READ
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassReadDevice (API #27h, SubFunc 03h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;		dStartLBA	DWORD	Starting LBA address
;		wNumBlks	WORD	Number of blocks to read
;		wPreSkipSize	WORD	Number of bytes to skip before
;		wPostSkipSize	WORD	Number of bytes to skip after
;		fpBufferPtr	DWORD	Far buffer pointer
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_READ	STRUC
	bDevAddr	BYTE	?		; USB Device Address
	dSenseData	DWORD	?		; USB Sense data
	dStartLBA	DWORD	?		; Starting LBA address
	wNumBlks	WORD	?		; Number of blocks to read
	wPreSkipSize	WORD	?		; Number of bytes to skip before
	wPostSkipSize	WORD	?		; Number of bytes to skip after
	fpBufferPtr	DWORD	?		; Far buffer pointer
MASS_READ	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_WRITE
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassWriteDevice (API #27h, SubFunc 04h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;		dStartLBA	DWORD	Starting LBA address
;		wNumBlks	WORD	Number of blocks to write
;		wPreSkipSize	WORD	Number of bytes to skip before
;		wPostSkipSize	WORD	Number of bytes to skip after
;		fpBufferPtr	DWORD	Far buffer pointer
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

MASS_WRITE	STRUC
	bDevAddr	BYTE	?		; USB Device Address
	dSenseData	DWORD	?		; USB Sense data
	dStartLBA	DWORD	?		; Starting LBA address
	wNumBlks	WORD	?		; Number of blocks to write
	wPreSkipSize	WORD	?		; Number of bytes to skip before
	wPostSkipSize	WORD	?		; Number of bytes to skip after
	fpBufferPtr	DWORD	?		; Far buffer pointer
MASS_WRITE	ENDS

;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		MASS_VERIFY
;
; Description:	This is a Mass URP (Mass USB Request Packet) structure for
;		the BIOS API call MassVerifyDevice (API #27h, SubFunc 05h)
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		bDevAddr	BYTE	USB device address of the device
;		dSenseData	DWORD	Sense data of the last command
;		dStartLBA	DWORD	Starting LBA address
;		wNumBlks	WORD	Number of blocks to verify
;		wPreSkipSize	WORD	Number of bytes to skip before
;		wPostSkipSize	WORD	Number of bytes to skip after
;		fpBufferPtr	DWORD	Far buffer pointer
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

⌨️ 快捷键说明

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