35 IN UINT16 DescriptorLength,
41 ASSERT (UsbIoPpi !=
NULL);
43 DevReq.RequestType = USB_DEV_GET_DESCRIPTOR_REQ_TYPE;
44 DevReq.Request = USB_DEV_GET_DESCRIPTOR;
47 DevReq.Length = DescriptorLength;
49 return UsbIoPpi->UsbControlTransfer (
54 PcdGet32 (PcdUsbTransferTimeoutValue),
76 IN UINT16 AddressValue
81 ASSERT (UsbIoPpi !=
NULL);
83 DevReq.RequestType = USB_DEV_SET_ADDRESS_REQ_TYPE;
84 DevReq.Request = USB_DEV_SET_ADDRESS;
85 DevReq.Value = AddressValue;
89 return UsbIoPpi->UsbControlTransfer (
94 PcdGet32 (PcdUsbTransferTimeoutValue),
121 DevReq.RequestType = USB_DEV_SET_CONFIGURATION_REQ_TYPE;
122 DevReq.Request = USB_DEV_SET_CONFIGURATION;
125 return UsbIoPpi->UsbControlTransfer (
130 PcdGet32 (PcdUsbTransferTimeoutValue),
173 if ((PortStatus & USB_PORT_STAT_LOW_SPEED) != 0) {
174 return EFI_USB_SPEED_LOW;
175 }
else if ((PortStatus & USB_PORT_STAT_HIGH_SPEED) != 0) {
176 return EFI_USB_SPEED_HIGH;
177 }
else if ((PortStatus & USB_PORT_STAT_SUPER_SPEED) != 0) {
180 return EFI_USB_SPEED_FULL;
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define EFI_USB_SPEED_SUPER
4.8 Gb/s, USB 3.0 XHCI HC.
#define USB_PORT_STAT_CONNECTION
#define PcdGet32(TokenName)
EFI_STATUS PeiUsbSetDeviceAddress(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *UsbIoPpi, IN UINT16 AddressValue)
EFI_STATUS PeiUsbGetDescriptor(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *UsbIoPpi, IN UINT16 Value, IN UINT16 Index, IN UINT16 DescriptorLength, OUT VOID *Descriptor)
UINTN PeiUsbGetDeviceSpeed(IN UINT16 PortStatus)
EFI_STATUS PeiUsbSetConfiguration(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *UsbIoPpi)
BOOLEAN IsPortConnect(IN UINT16 PortStatus)