/** @file\r
Debug Port Library implementation based on usb debug port.\r
\r
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
UINT8 DebugOutEndpoint;\r
}USB_DEBUG_PORT_DESCRIPTOR;\r
\r
-USB_DEVICE_REQUEST mGetDebugDescriptor = {\r
+USB_DEVICE_REQUEST mDebugCommunicationLibUsbGetDebugDescriptor = {\r
0x80,\r
USB_REQ_GET_DESCRIPTOR,\r
(UINT16)(0x0A << 8),\r
sizeof(USB_DEBUG_PORT_DESCRIPTOR)\r
};\r
\r
-USB_DEVICE_REQUEST mSetDebugFeature = {\r
+USB_DEVICE_REQUEST mDebugCommunicationLibUsbSetDebugFeature = {\r
0x0,\r
USB_REQ_SET_FEATURE,\r
(UINT16)(0x06),\r
0x0\r
};\r
\r
-USB_DEVICE_REQUEST mSetDebugAddress = {\r
+USB_DEVICE_REQUEST mDebugCommunicationLibUsbSetDebugAddress = {\r
0x0,\r
USB_REQ_SET_ADDRESS,\r
(UINT16)(0x7F),\r
//\r
// The global variable which can be used after memory is ready.\r
//\r
-USB_DEBUG_PORT_HANDLE mUsbDebugPortHandle;\r
+USB_DEBUG_PORT_HANDLE mDebugCommunicationLibUsbDebugPortHandle;\r
\r
/**\r
Check if the timer is timeout.\r
//\r
// set usb debug device address as 0x7F.\r
//\r
- Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mSetDebugAddress, 0x0, 0x0, NULL, NULL);\r
+ Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mDebugCommunicationLibUsbSetDebugAddress, 0x0, 0x0, NULL, NULL);\r
if (RETURN_ERROR(Status)) {\r
//\r
// The device can not work well.\r
//\r
// Get debug descriptor.\r
//\r
- Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mGetDebugDescriptor, 0x7F, 0x0, (UINT8*)&UsbDebugPortDescriptor, &Length);\r
+ Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mDebugCommunicationLibUsbGetDebugDescriptor, 0x7F, 0x0, (UINT8*)&UsbDebugPortDescriptor, &Length);\r
if (RETURN_ERROR(Status)) {\r
//\r
// The device is not a usb debug device.\r
//\r
// enable the usb debug feature.\r
//\r
- Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mSetDebugFeature, 0x7F, 0x0, NULL, NULL);\r
+ Status = UsbDebugPortControlTransfer (UsbDebugPortRegister, &mDebugCommunicationLibUsbSetDebugFeature, 0x7F, 0x0, NULL, NULL);\r
if (RETURN_ERROR(Status)) {\r
//\r
// The device can not work well.\r
// Use global variable to store handle value.\r
//\r
if (Handle == NULL) {\r
- UsbDebugPortHandle = &mUsbDebugPortHandle;\r
+ UsbDebugPortHandle = &mDebugCommunicationLibUsbDebugPortHandle;\r
} else {\r
UsbDebugPortHandle = (USB_DEBUG_PORT_HANDLE *)Handle;\r
}\r
// Use global variable to store handle value.\r
//\r
if (Handle == NULL) {\r
- UsbDebugPortHandle = &mUsbDebugPortHandle;\r
+ UsbDebugPortHandle = &mDebugCommunicationLibUsbDebugPortHandle;\r
} else {\r
UsbDebugPortHandle = (USB_DEBUG_PORT_HANDLE *)Handle;\r
}\r
// Use global variable to store handle value.\r
//\r
if (Handle == NULL) {\r
- UsbDebugPortHandle = &mUsbDebugPortHandle;\r
+ UsbDebugPortHandle = &mDebugCommunicationLibUsbDebugPortHandle;\r
} else {\r
UsbDebugPortHandle = (USB_DEBUG_PORT_HANDLE *)Handle;\r
}\r
USB_DEBUG_PORT_HANDLE *UsbDebugPortHandle;\r
UINT64 TimerStartValue;\r
UINT64 TimerEndValue;\r
-\r //\r
+\r
+ //\r
// Validate the PCD PcdDebugPortHandleBufferSize value \r
//\r
ASSERT (PcdGet16 (PcdDebugPortHandleBufferSize) == sizeof (USB_DEBUG_PORT_HANDLE));\r
if (Function != NULL) {\r
Function (Context, &Handle);\r
} else {\r
- CopyMem(&mUsbDebugPortHandle, &Handle, sizeof (USB_DEBUG_PORT_HANDLE));\r
+ CopyMem(&mDebugCommunicationLibUsbDebugPortHandle, &Handle, sizeof (USB_DEBUG_PORT_HANDLE));\r
}\r
\r
- return (DEBUG_PORT_HANDLE)(UINTN)&mUsbDebugPortHandle;\r
+ return (DEBUG_PORT_HANDLE)(UINTN)&mDebugCommunicationLibUsbDebugPortHandle;\r
}\r
\r