/** @file
Common Libarary for PEI USB
Copyright (c) 2006 - 2010, 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 _PEI_USB_LIB_H_
#define _PEI_USB_LIB_H_
//
// Standard device request and request type
// By [Spec-USB20/Chapter-9.4]
//
//
// USB Descriptor types
//
//
// USB request type
//
//
// USB request targer device
//
typedef enum {
//
// Usb Data recipient type
//
typedef enum {
/**
Get a given usb descriptor.
@param PeiServices General-purpose services that are available to every PEIM.
@param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
@param Value Request Value.
@param Index Request Index.
@param DescriptorLength Request descriptor Length.
@param Descriptor Request descriptor.
@retval EFI_SUCCESS Usb descriptor is obtained successfully.
@retval EFI_DEVICE_ERROR Cannot get the usb descriptor due to a hardware error.
@retval Others Other failure occurs.
**/
);
/**
Set a usb device with a specified address.
@param PeiServices General-purpose services that are available to every PEIM.
@param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
@param AddressValue The address to assign.
@retval EFI_SUCCESS Usb device address is set successfully.
@retval EFI_DEVICE_ERROR Cannot set the usb address due to a hardware error.
@retval Others Other failure occurs.
**/
);
/**
Clear a given usb feature.
@param PeiServices General-purpose services that are available to every PEIM.
@param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
@param Value Request Value.
@param Target Request Index.
@retval EFI_SUCCESS Usb feature is cleared successfully.
@retval EFI_DEVICE_ERROR Cannot clear the usb feature due to a hardware error.
@retval Others Other failure occurs.
**/
);
/**
Configure a usb device to Configuration 1.
@param PeiServices General-purpose services that are available to every PEIM.
@param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
@retval EFI_SUCCESS Usb device is set to use Configuration 1 successfully.
@retval EFI_DEVICE_ERROR Cannot set the usb device due to a hardware error.
@retval Others Other failure occurs.
**/
);
/**
Clear Endpoint Halt.
@param PeiServices General-purpose services that are available to every PEIM.
@param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.
@param EndpointAddress The endpoint address.
@retval EFI_SUCCESS Endpoint halt is cleared successfully.
@retval EFI_DEVICE_ERROR Cannot clear the endpoint halt status due to a hardware error.
@retval Others Other failure occurs.
**/
);
/**
Judge if the port is connected with a usb device or not.
@param PortStatus The usb port status gotten.
@retval TRUE A usb device is connected with the port.
@retval FALSE No usb device is connected with the port.
**/
);
/**
Judge if the port is connected with a low-speed usb device or not.
@param PortStatus The usb port status gotten.
@retval TRUE A low-speed usb device is connected with the port.
@retval FALSE No low-speed usb device is connected with the port.
**/
);
/**
Judge if the port is in "connection change" status or not.
@param PortChangeStatus The usb port change status gotten.
@retval TRUE The port is in "connection change" status.
@retval FALSE The port is NOT in "connection change" status.
**/
);
#endif