/** @file\r
Common Libarary for PEI USB\r
\r
-Copyright (c) 2006 - 2014, 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
}\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
- // return the bit 9 value of PortStatus\r
- //\r
if ((PortStatus & USB_PORT_STAT_LOW_SPEED) != 0) {\r
return EFI_USB_SPEED_LOW;\r
} else if ((PortStatus & USB_PORT_STAT_HIGH_SPEED) != 0){\r
return EFI_USB_SPEED_HIGH;\r
+ } else if ((PortStatus & USB_PORT_STAT_SUPER_SPEED) != 0) {\r
+ return EFI_USB_SPEED_SUPER;\r
} else {\r
return EFI_USB_SPEED_FULL;\r
}\r