/** @file
Support for USB 2.0 standard.
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __USB_H__
#define __USB_H__
//
// Standard device request and request type
// USB 2.0 spec, Section 9.4
//
//
// 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 {
///
/// Standard Device Descriptor
/// USB 2.0 spec, Section 9.6.1
///
typedef struct {
///
/// Standard Configuration Descriptor
/// USB 2.0 spec, Section 9.6.3
///
typedef struct {
///
/// Standard Interface Descriptor
/// USB 2.0 spec, Section 9.6.5
///
typedef struct {
///
/// Standard Endpoint Descriptor
/// USB 2.0 spec, Section 9.6.6
///
typedef struct {
///
/// UNICODE String Descriptor
/// USB 2.0 spec, Section 9.6.7
///
typedef struct {
#pragma pack()
typedef enum {
//
// USB request type
//
//
// Standard control transfer request type, or the value
// to fill in EFI_USB_DEVICE_REQUEST.Request
//
//
// Usb control transfer target
//
USB_TARGET_DEVICE = 0,
//
// USB Descriptor types
//
//
// Features to be cleared by CLEAR_FEATURE requests
//
//
// USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt
//
//
//Use 200 ms to increase the error handling response time
//
//
// HID constants definition, see Device Class Definition
// for Human Interface Devices (HID) rev1.11
//
//
// HID standard GET_DESCRIPTOR request.
//
//
// HID specific requests.
//
//
// HID report item format
//
#define HID_ITEM_FORMAT_SHORT 0
//
// Special tag indicating long items
//
//
// HID report descriptor item type (prefix bit 2,3)
//
#define HID_ITEM_TYPE_MAIN 0
//
// HID report descriptor main item tags
//
//
// HID report descriptor main item contents
//
//
// HID report descriptor collection item types
//
#define HID_COLLECTION_PHYSICAL 0
//
// HID report descriptor global item tags
//
#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
//
// HID report descriptor local item tags
//
#define HID_LOCAL_ITEM_TAG_USAGE 0
//
// HID report types
//
//
// HID class protocol request
//
#pragma pack(1)
///
/// HID 1.1, section 6.2.1
///
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 {
#pragma pack()
#endif