mirror of https://github.com/acidanthera/audk.git
Retired macro value TIME_OUT in UefiUsbLib and introduce a new PCD entry PcdUsbTransferTimeoutValue for it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7467 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2f5c655aae
commit
6544297832
|
@ -20,11 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/UsbIo.h>
|
||||
#include <IndustryStandard/Usb.h>
|
||||
|
||||
///
|
||||
/// define the timeout time as 3ms
|
||||
///
|
||||
#define TIMEOUT_VALUE 3 * 1000
|
||||
|
||||
/**
|
||||
Get the descriptor of the specified USB HID interface.
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ UsbGetHidDescriptor (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
HidDescriptor,
|
||||
sizeof (EFI_USB_HID_DESCRIPTOR),
|
||||
&Status
|
||||
|
@ -133,7 +133,7 @@ UsbGetReportDescriptor (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
DescriptorBuffer,
|
||||
DescriptorLength,
|
||||
&Status
|
||||
|
@ -188,7 +188,7 @@ UsbGetProtocolRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Protocol,
|
||||
sizeof (UINT8),
|
||||
&Status
|
||||
|
@ -242,7 +242,7 @@ UsbSetProtocolRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
&Status
|
||||
|
@ -295,7 +295,7 @@ UsbSetIdleRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
&Status
|
||||
|
@ -350,7 +350,7 @@ UsbGetIdleRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Duration,
|
||||
1,
|
||||
&Status
|
||||
|
@ -413,7 +413,7 @@ UsbSetReportRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataOut,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Report,
|
||||
ReportLen,
|
||||
&Status
|
||||
|
@ -478,7 +478,7 @@ UsbGetReportRequest (
|
|||
UsbIo,
|
||||
&Request,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Report,
|
||||
ReportLen,
|
||||
&Status
|
||||
|
|
|
@ -40,4 +40,7 @@
|
|||
[LibraryClasses]
|
||||
DebugLib
|
||||
BaseMemoryLib
|
||||
PcdLib
|
||||
|
||||
[Pcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue
|
|
@ -21,6 +21,7 @@
|
|||
#include <Library/UefiUsbLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
#include <IndustryStandard/Usb.h>
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ UsbGetDescriptor (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Descriptor,
|
||||
DescriptorLength,
|
||||
Status
|
||||
|
@ -133,7 +133,7 @@ UsbSetDescriptor (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbDataOut,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
Descriptor,
|
||||
DescriptorLength,
|
||||
Status
|
||||
|
@ -188,7 +188,7 @@ UsbGetInterface (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
AlternateSetting,
|
||||
2,
|
||||
Status
|
||||
|
@ -241,7 +241,7 @@ UsbSetInterface (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
Status
|
||||
|
@ -293,7 +293,7 @@ UsbGetConfiguration (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
ConfigurationValue,
|
||||
2,
|
||||
Status
|
||||
|
@ -343,7 +343,7 @@ UsbSetConfiguration (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
Status
|
||||
|
@ -420,7 +420,7 @@ UsbSetFeature (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
Status
|
||||
|
@ -498,7 +498,7 @@ UsbClearFeature (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbNoData,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
NULL,
|
||||
0,
|
||||
Status
|
||||
|
@ -577,7 +577,7 @@ UsbGetStatus (
|
|||
UsbIo,
|
||||
&DevReq,
|
||||
EfiUsbDataIn,
|
||||
TIMEOUT_VALUE,
|
||||
PcdGet32 (PcdUsbTransferTimeoutValue),
|
||||
DeviceStatus,
|
||||
2,
|
||||
Status
|
||||
|
|
|
@ -518,6 +518,9 @@
|
|||
## Indicates the allowable maximum number in extract handler table
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025
|
||||
|
||||
## Indicates the default timeouts for USB transfers in milliseconds
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue|3000|UINT32|0x00000026
|
||||
|
||||
## Default current ISO 639-2 language: English
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang|"eng"|VOID*|0x0000001d
|
||||
|
||||
|
@ -611,6 +614,9 @@
|
|||
|
||||
## Indicates the allowable maximum number in extract handler table
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025
|
||||
|
||||
## Indicates the default timeouts for USB transfers in milliseconds
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue|3000|UINT32|0x00000026
|
||||
|
||||
[PcdsDynamic.common]
|
||||
## Default current ISO 639-2 language: English & French
|
||||
|
|
Loading…
Reference in New Issue