X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FIndustryStandard%2FUsb.h;h=c27ea15b4122af09cd49bda3daa4fcf42ad9eacf;hb=71a2a892658baac6301e81ad58a8abbc05fa17d2;hp=5ec270c7a118840d6240967019f4d91f32cd164c;hpb=c76a83cc63a66462516252a8d15d0e6d0b2150bc;p=mirror_edk2.git diff --git a/MdePkg/Include/IndustryStandard/Usb.h b/MdePkg/Include/IndustryStandard/Usb.h index 5ec270c7a1..c27ea15b41 100644 --- a/MdePkg/Include/IndustryStandard/Usb.h +++ b/MdePkg/Include/IndustryStandard/Usb.h @@ -1,8 +1,8 @@ /** @file Support for USB 2.0 standard. - Copyright (c) 2006 - 2008, 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,6 +15,32 @@ #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 // USB 2.0 spec, Section 9.4 @@ -62,6 +88,7 @@ // // USB standard descriptors and reqeust // +#pragma pack(1) /// /// Format of Setup Data for USB Device Requests @@ -96,7 +123,6 @@ typedef struct { UINT8 NumConfigurations; } USB_DEVICE_DESCRIPTOR; -#pragma pack(1) /// /// Standard Configuration Descriptor /// USB 2.0 spec, Section 9.6.3 @@ -111,7 +137,6 @@ typedef struct { UINT8 Attributes; UINT8 MaxPower; } USB_CONFIG_DESCRIPTOR; -#pragma pack() /// /// Standard Interface Descriptor @@ -129,7 +154,6 @@ typedef struct { UINT8 Interface; } USB_INTERFACE_DESCRIPTOR; -#pragma pack(1) /// /// Standard Endpoint Descriptor /// USB 2.0 spec, Section 9.6.6 @@ -142,7 +166,6 @@ typedef struct { UINT16 MaxPacketSize; UINT8 Interval; } USB_ENDPOINT_DESCRIPTOR; -#pragma pack() /// /// UNICODE String Descriptor @@ -154,6 +177,9 @@ typedef struct { CHAR16 String[1]; } EFI_USB_STRING_DESCRIPTOR; +#pragma pack() + + typedef enum { // // USB request type @@ -334,6 +360,7 @@ 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; @@ -343,6 +370,7 @@ typedef struct 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; @@ -352,6 +380,7 @@ typedef struct hid_descriptor { UINT8 NumDescriptors; EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1]; } EFI_USB_HID_DESCRIPTOR; + #pragma pack() #endif