/** @file\r
Common Libarary for PEI USB\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
- \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>\r
+\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
of the BSD License which accompanies this distribution. The\r
#define USB_DT_INTERFACE 0x04\r
#define USB_DT_ENDPOINT 0x05\r
#define USB_DT_HUB 0x29\r
+#define USB_DT_SUPERSPEED_HUB 0x2A\r
#define USB_DT_HID 0x21\r
\r
//\r
IN UINT16 AddressValue\r
);\r
\r
-/**\r
- Clear a given usb feature.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param Recipient The recipient of ClearFeature Request, should be one of Device/Interface/Endpoint.\r
- @param Value Request Value.\r
- @param Target Request Index.\r
-\r
- @retval EFI_SUCCESS Usb feature is cleared successfully.\r
- @retval EFI_DEVICE_ERROR Cannot clear the usb feature due to a hardware error.\r
- @retval Others Other failure occurs.\r
-\r
-**/\r
-EFI_STATUS\r
-PeiUsbClearDeviceFeature (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN EFI_USB_RECIPIENT Recipient,\r
- IN UINT16 Value,\r
- IN UINT16 Target\r
- );\r
\r
/**\r
Configure a usb device to Configuration 1.\r
IN PEI_USB_IO_PPI *UsbIoPpi\r
);\r
\r
-/**\r
- Clear Endpoint Halt.\r
-\r
- @param PeiServices General-purpose services that are available to every PEIM.\r
- @param UsbIoPpi Indicates the PEI_USB_IO_PPI instance.\r
- @param EndpointAddress The endpoint address.\r
-\r
- @retval EFI_SUCCESS Endpoint halt is cleared successfully.\r
- @retval EFI_DEVICE_ERROR Cannot clear the endpoint halt status due to a hardware error.\r
- @retval Others Other failure occurs.\r
-\r
-**/\r
-EFI_STATUS\r
-PeiUsbClearEndpointHalt (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_USB_IO_PPI *UsbIoPpi,\r
- IN UINT8 EndpointAddress\r
- );\r
-\r
/**\r
Judge if the port is connected with a usb device or not.\r
\r
);\r
\r
/**\r
- Judge if the port is connected with a low-speed usb device or not.\r
+ Get device speed according to port status.\r
\r
- @param PortStatus The usb port status gotten.\r
+ @param PortStatus The usb port status gotten.\r
\r
- @retval TRUE A low-speed usb device is connected with the port.\r
- @retval FALSE No low-speed usb device is connected with the port.\r
+ @return Device speed value.\r
\r
**/\r
UINTN\r
-IsPortLowSpeedDeviceAttached (\r
- IN UINT16 PortStatus\r
+PeiUsbGetDeviceSpeed (\r
+ IN UINT16 PortStatus\r
);\r
\r
-/**\r
- Judge if the port is in "connection change" status or not.\r
-\r
- @param PortChangeStatus The usb port change status gotten.\r
-\r
- @retval TRUE The port is in "connection change" status.\r
- @retval FALSE The port is NOT in "connection change" status.\r
-\r
-**/\r
-BOOLEAN\r
-IsPortConnectChange (\r
- IN UINT16 PortChangeStatus\r
- );\r
#endif\r