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

📄 usb.equ

📁 AMI 主板的BIOS源码。
💻 EQU
📖 第 1 页 / 共 2 页
字号:

	NumInterfaces	db ?	;Number of interfaces in this config
	ConfigValue	db ?	;Value to use in SetConfiguration command
	ConfigString	db ?	;Index of string desc describing this config
	ConfigFlags	db ?	;See CFG_DESC_FLAG_xxx values below
	ConfigPower	db ?	;Power used by this config in 2mA units

ConfigDescriptor	ends


; Bit definitions for ConfigDescriptor.ConfigFlags
;-------------------------------------------------------------------------------
CFG_DESC_FLAG_BUS_POWERED	equ 80h	;Bit 7: If set, device is bus powered
CFG_DESC_FLAG_SELF_POWERED	equ 40h	;Bit 6: If set, device is self powered
CFG_DESC_FLAG_REMOTE_WAKE	equ 20h	;Bit 5: If set, device supports remote wakeup


; InterfaceDescriptor structure
;-------------------------------------------------------------------------------
InterfaceDescriptor	struc

	DescLength	db ?	;Length of this descriptor (9h bytes)
	DescType	db ?	;Type code of this descriptor (04h)

	InterfaceNum	db ?	;Zero based index of interface in the configuration
	AltSettingNum	db ?	;Alternate setting number of this interface
	NumEndpoints	db ?	;Number of endpoints in this interface
	
	BaseClass	db ?	;Interface's base class code
	SubClass	db ?	;Interface's sub class code
	Protocol	db ?	;Interface's protocol type code

	InterfaceString	db ?	;Index of string desc describing this interface

InterfaceDescriptor	ends


; Values for InterfaceDescriptor.BaseClass
;-------------------------------------------------------------------------------
BASS_CLASS_HID			equ 03h	;Human Interface Device Class
BASE_CLASS_HUB			equ 09h	;Hub Device Class?


; Values for InterfaceDescriptor.SubClass
;-------------------------------------------------------------------------------
SUB_CLASS_BOOT_DEVICE		equ 01h	;Boot device sub-class
SUB_CLASS_HUB			equ 01h	;Hub Device Sub Class?


; Values for InterfaceDescriptor.Protocol
;-------------------------------------------------------------------------------
PROTOCOL_KEYBOARD		equ 01h	;Keyboard device protocol
PROTOCOL_MOUSE			equ 02h	;Mouse device protocol?


; EndpointDescriptor structure
;-------------------------------------------------------------------------------
EndpointDescriptor	struc

	DescLength	db ?	;Length of this descriptor (7h bytes)
	DescType	db ?	;Type code of this descriptor (05h)

	EndpointAddr	db ?	;See EP_DESC_ADDR_xxx values below
	EndpointFlags	db ?	;See EP_DESC_FLAG_xxx value below
	MaxPacketSize	dw ?	;Max packet size of endpoint
	PollInterval	db ?	;Polling interval of endpoint in milliseconds

EndpointDescriptor	ends


; Bit definitions for EndpointDescriptor.EndpointAddr
;-------------------------------------------------------------------------------
EP_DESC_ADDR_EP_NUM	equ 0Fh	;Bit 3-0: Endpoint number
EP_DESC_ADDR_DIR_BIT	equ 80h	;Bit 7: Direction of endpoint, 1/0 = In/Out


; Bit definitions for EndpointDescriptor.EndpointFlags
;-------------------------------------------------------------------------------
EP_DESC_FLAG_TYPE_BITS	equ 03h	;Bit 1-0: Indicate type of transfer on endpoint
EP_DESC_FLAG_TYPE_CONT	equ 00h	;Bit 1-0: 00 = Endpoint does control transfers
EP_DESC_FLAG_TYPE_ISOC	equ 01h	;Bit 1-0: 01 = Endpoint does isochronous transfers
EP_DESC_FLAG_TYPE_BULK	equ 02h	;Bit 1-0: 10 = Endpoint does bulk transfers
EP_DESC_FLAG_TYPE_INT	equ 03h	;Bit 1-0: 11 = Endpoint does interrupt transfers


; HubDescriptor structure
;-------------------------------------------------------------------------------
HubDescriptor	struc

	DescLength	db ?	;Length of this descriptor (variable)
	DescType	db ?	;Type code of this descriptor (00h)

	NumPorts	db ?	;Number of downstream ports on hub
	HubFlags	dw ?	;See HUB_FLAG_xxx bit definitions below
	PowerOnDelay	db ?	;Time to delay after turning on power to port (in 2ms units)
	HubControlAmps	db ?	;Milliamps of current needed by hub controller

	DeviceRemovable	db ?	;Variable size array of bits (one for each port)
				; if set, device at that port is not removable

	;NOTE: Fields below here have variable offsets

	;PortPowerCtrl	db ?	;Variable size array of bits (one for each port)
				; if set, port is not affected by gang-mode power
				; commands, only individual port command affect port
HubDescriptor	ends


; Bit definitions for HubDescriptor.HubFlags
;-------------------------------------------------------------------------------
HUB_FLAG_PWR_MODE_BITS	equ 03h	;Bit 1-0: Power switching mode used by hub
HUB_FLAG_PWR_MODE_GANG	equ 00h	;    =00: All ports power on/off together
HUB_FLAG_PWR_MODE_INDIV	equ 01h	;    =01: Ports power on/off individually
HUB_FLAG_PWR_MODE_FIXED	equ 02h	;    =1x: Ports power is always on
HUB_FLAG_COMPOUND_DEV	equ 04h	;Bit 2: If set, hub is part of a compound device
HUB_FLAG_OVR_CUR_BITS	equ 18h	;Bit 4-3: Over-current protection mode used by hub
HUB_FLAG_OVR_CUR_GLOBAL	equ 00h	;    =00: Hub reports only global over-current status
HUB_FLAG_OVR_CUR_INDIV	equ 08h	;    =01: Hub reports individual over-current status
HUB_FLAG_OVR_CUR_NONE	equ 10h	;    =1x: Hub has no over-current protection


; Hub Class Feature Selectors
;-------------------------------------------------------------------------------
HUB_FEATURE_PORT_ENABLE		equ 01h	;Hub port enable feature
HUB_FEATURE_PORT_RESET		equ 04h	;Hub port reset feature
HUB_FEATURE_PORT_POWER		equ 08h	;Hub port power feature
HUB_FEATURE_PORT_LOW_SPEED	equ 09h	;Hub port low speed feature
HUB_FEATURE_PORT_CONNECT_CHANGE	equ 10h	;Hub port connect change feature
HUB_FEATURE_PORT_ENABLE_CHANGE	equ 11h	;Hub port enable change feature
HUB_FEATURE_PORT_RESET_CHANGE	equ 14h	;Hub port reset change feature

; Hub Port Status Bit Definitions
;-------------------------------------------------------------------------------
HUB_PORT_STATUS_DEVICE_PRESENT	equ 0001h ;Bit 0: Set if device present
HUB_PORT_STATUS_ENABLED		equ 0002h ;Bit 1: Set if port is enabled
HUB_PORT_STATUS_SUSPEND		equ 0004h ;Bit 2: Set if device on port is suspended
HUB_PORT_STATUS_OVERCURRENT	equ 0008h ;Bit 3: Set if port has been powered down due to over-current
HUB_PORT_STATUS_RESET		equ 0010h ;Bit 4: Set if reset sigaling is active
HUB_PORT_STATUS_POWER		equ 0100h ;Bit 8: Set if port is enabled
HUB_PORT_STATUS_LOW_SPEED	equ 0200h ;Bit 9: Set if a low speed device is attached
HUB_PORT_STATUS_CHANGE_CONNECT	equ 0001h ;Bit 0: Set if device has been attached/removed
HUB_PORT_STATUS_CHANGE_ENABLE	equ 0002h ;Bit 1: Set if port has been enabled/disabled by hardware in hub
HUB_PORT_STATUS_CHANGE_SUSPEND	equ 0004h ;Bit 2: Set if device has entered/left suspend state
HUB_PORT_STATUS_CHANGE_OVERCURRENT equ 0008h; Bit 3: Set if over current indicator has changed
HUB_PORT_STATUS_CHANGE_RESET	equ 0010h ;Bit 4: Set when port reset sequence is complete


ifdef	DOS_DEBUG
cpu_gen_purpose_reg_entry	equ	0
orgbase				equ	0h
;struc_cpu_gen_purpose_reg	struc
reg_eax		equ	00h			; 1 DWORD...EAX
reg_ebx		equ	reg_eax + 04		; 1 DWORD...EBX
reg_ecx		equ	reg_ebx + 04		; 1 DWORD...ECX
reg_edx		equ	reg_ecx + 04		; 1 DWORD...EDX
reg_esi		equ	reg_edx + 04		; 1 DWORD...ESI
reg_edi		equ	reg_esi + 04		; 1 DWORD...EDI
reg_ebp		equ	reg_edi + 04		; 1 DWORD...EBP
reg_eflags	equ	reg_ebp + 04		; 1 DWORD...EFLAGS
reg_cr0		equ	reg_eflags + 04		; 1 DWORD...CR0
;struc_cpu_gen_purpose_reg	ends

else
	include	gpm.equ
	include gpm.dat
	include gpmcpu.equ
endif

;*****************************************************************;
;*****************************************************************;
;**                                                             **;
;**      (C)Copyright 1985-1996, American Megatrends, Inc.      **;
;**                                                             **;
;**                     All Rights Reserved.                    **;
;**                                                             **;
;**           6145-F Northbelt Pkwy, Norcross, GA 30071         **;
;**                                                             **;
;**                     Phone (770)-246-8600                    **;
;**                                                             **;
;*****************************************************************;
;*****************************************************************;

⌨️ 快捷键说明

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