X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FIndustryStandard%2FUsb.h;h=c27ea15b4122af09cd49bda3daa4fcf42ad9eacf;hp=0d6da311f687b930034c61494dd51ab81e189a1d;hb=714eedc5b9ee92629e649c100862b828448a91c7;hpb=11ceade4ba5ea80bfa660ea2c464c50593b9a993 diff --git a/MdePkg/Include/IndustryStandard/Usb.h b/MdePkg/Include/IndustryStandard/Usb.h index 0d6da311f6..c27ea15b41 100644 --- a/MdePkg/Include/IndustryStandard/Usb.h +++ b/MdePkg/Include/IndustryStandard/Usb.h @@ -1,8 +1,8 @@ /** @file - Support for USB 1.1 standard. + Support for USB 2.0 standard. - Copyright (c) 2006 - 2007, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -15,9 +15,35 @@ #ifndef __USB_H__ #define __USB_H__ +// +// Subset of Class and Subclass definitions from USB Specs +// + +// +// Usb mass storage class code +// +#define USB_MASS_STORE_CLASS 0x08 + +// +// Usb mass storage subclass code, specify the command set used. +// +#define USB_MASS_STORE_RBC 0x01 ///< Reduced Block Commands +#define USB_MASS_STORE_8020I 0x02 ///< SFF-8020i, typically a CD/DVD device +#define USB_MASS_STORE_QIC 0x03 ///< Typically a tape device +#define USB_MASS_STORE_UFI 0x04 ///< Typically a floppy disk driver device +#define USB_MASS_STORE_8070I 0x05 ///< SFF-8070i, typically a floppy disk driver device. +#define USB_MASS_STORE_SCSI 0x06 ///< SCSI transparent command set + +// +// Usb mass storage protocol code, specify the transport protocol +// +#define USB_MASS_STORE_CBI0 0x00 ///< CBI protocol with command completion interrupt +#define USB_MASS_STORE_CBI1 0x01 ///< CBI protocol without command completion interrupt +#define USB_MASS_STORE_BOT 0x50 ///< Bulk-Only Transport + // // Standard device request and request type -// By [Spec-USB20/Chapter-9.4] +// USB 2.0 spec, Section 9.4 // #define USB_DEV_GET_STATUS 0x00 #define USB_DEV_GET_STATUS_REQ_TYPE_D 0x80 // Receiver : Device @@ -63,6 +89,11 @@ // USB standard descriptors and reqeust // #pragma pack(1) + +/// +/// Format of Setup Data for USB Device Requests +/// USB 2.0 spec, Section 9.3 +/// typedef struct { UINT8 RequestType; UINT8 Request; @@ -71,6 +102,10 @@ typedef struct { UINT16 Length; } USB_DEVICE_REQUEST; +/// +/// Standard Device Descriptor +/// USB 2.0 spec, Section 9.6.1 +/// typedef struct { UINT8 Length; UINT8 DescriptorType; @@ -88,6 +123,10 @@ typedef struct { UINT8 NumConfigurations; } USB_DEVICE_DESCRIPTOR; +/// +/// Standard Configuration Descriptor +/// USB 2.0 spec, Section 9.6.3 +/// typedef struct { UINT8 Length; UINT8 DescriptorType; @@ -99,6 +138,10 @@ typedef struct { UINT8 MaxPower; } USB_CONFIG_DESCRIPTOR; +/// +/// Standard Interface Descriptor +/// USB 2.0 spec, Section 9.6.5 +/// typedef struct { UINT8 Length; UINT8 DescriptorType; @@ -111,6 +154,10 @@ typedef struct { UINT8 Interface; } USB_INTERFACE_DESCRIPTOR; +/// +/// Standard Endpoint Descriptor +/// USB 2.0 spec, Section 9.6.6 +/// typedef struct { UINT8 Length; UINT8 DescriptorType; @@ -120,6 +167,10 @@ typedef struct { UINT8 Interval; } USB_ENDPOINT_DESCRIPTOR; +/// +/// UNICODE String Descriptor +/// USB 2.0 spec, Section 9.6.7 +/// typedef struct { UINT8 Length; UINT8 DescriptorType; @@ -196,7 +247,8 @@ typedef enum { // -// HID constants definition, see HID rev1.0 +// HID constants definition, see Device Class Definition +// for Human Interface Devices (HID) rev1.11 // // @@ -308,12 +360,18 @@ typedef enum { #pragma pack(1) /// /// Descriptor header for Report/Physical Descriptors +/// HID 1.1, section 6.2.1 /// typedef struct hid_class_descriptor { UINT8 DescriptorType; UINT16 DescriptorLength; } EFI_USB_HID_CLASS_DESCRIPTOR; +/// +/// The HID descriptor identifies the length and type +/// of subordinate descriptors for a device. +/// HID 1.1, section 6.2.1 +/// typedef struct hid_descriptor { UINT8 Length; UINT8 DescriptorType;