[USBPORT] Add USBPORT_DumpingEndpointProperties() and USBPORT_DumpingTtEndpoint().

This commit is contained in:
Vadim Galyant 2017-12-08 18:16:49 +09:00 committed by Amine Khaldi
parent 698f092ab1
commit 3bda39fcb8
3 changed files with 66 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#define NDEBUG_USBPORT_MINIPORT
#define NDEBUG_USBPORT_URB
//#define NDEBUG_USBPORT_USB2
#include "usbdebug.h"
ULONG
@ -275,3 +276,39 @@ USBPORT_DumpingIDs(IN PVOID Buffer)
DPRINT("\n");
}
VOID
NTAPI
USBPORT_DumpingEndpointProperties(IN PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties)
{
DPRINT_USB2("DeviceAddress - %X\n", EndpointProperties->DeviceAddress);
DPRINT_USB2("EndpointAddress - %X\n", EndpointProperties->EndpointAddress);
DPRINT_USB2("TotalMaxPacketSize - %X\n", EndpointProperties->TotalMaxPacketSize);
DPRINT_USB2("Period - %X\n", EndpointProperties->Period);
DPRINT_USB2("DeviceSpeed - %X\n", EndpointProperties->DeviceSpeed);
DPRINT_USB2("UsbBandwidth - %X\n", EndpointProperties->UsbBandwidth);
DPRINT_USB2("ScheduleOffset - %X\n", EndpointProperties->ScheduleOffset);
DPRINT_USB2("TransferType - %X\n", EndpointProperties->TransferType);
DPRINT_USB2("MaxTransferSize - %X\n", EndpointProperties->MaxTransferSize);
DPRINT_USB2("HubAddr - %X\n", EndpointProperties->HubAddr);
DPRINT_USB2("PortNumber - %X\n", EndpointProperties->PortNumber);
DPRINT_USB2("InterruptScheduleMask - %X\n", EndpointProperties->InterruptScheduleMask);
DPRINT_USB2("SplitCompletionMask - %X\n", EndpointProperties->SplitCompletionMask);
DPRINT_USB2("MaxPacketSize - %X\n", EndpointProperties->MaxPacketSize);
}
VOID
NTAPI
USBPORT_DumpingTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint)
{
DPRINT_USB2("MaxPacketSize - %X\n", TtEndpoint->MaxPacketSize);
DPRINT_USB2("Period - %X\n", TtEndpoint->Period);
DPRINT_USB2("TtEndpointParams- %X\n", TtEndpoint->TtEndpointParams.AsULONG);
DPRINT_USB2("CalcBusTime - %X\n", TtEndpoint->CalcBusTime);
DPRINT_USB2("StartTime - %X\n", TtEndpoint->StartTime);
DPRINT_USB2("ActualPeriod - %X\n", TtEndpoint->ActualPeriod);
DPRINT_USB2("StartFrame - %X\n", TtEndpoint->StartFrame);
DPRINT_USB2("StartMicroframe - %X\n", TtEndpoint->StartMicroframe);
DPRINT_USB2("Nums - %X\n", TtEndpoint->Nums.AsULONG);
DPRINT_USB2("nextTtEndpoint - %X\n", TtEndpoint->NextTtEndpoint);
}

View file

@ -112,6 +112,23 @@
#endif
#ifndef NDEBUG_USBPORT_USB2
#define DPRINT_USB2(fmt, ...) do { \
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
} while (0)
#else
#if defined(_MSC_VER)
#define DPRINT_USB2 __noop
#else
#define DPRINT_USB2(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#endif
#endif
#else /* not DBG */
#if defined(_MSC_VER)
@ -121,6 +138,7 @@
#define DPRINT_INT __noop
#define DPRINT_TIMER __noop
#define DPRINT_QUEUE __noop
#define DPRINT_USB2 __noop
#else
#define DPRINT_MINIPORT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define DPRINT_CORE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
@ -128,6 +146,7 @@
#define DPRINT_INT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define DPRINT_TIMER(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define DPRINT_QUEUE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define DPRINT_USB2(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#endif /* _MSC_VER */
#endif /* not DBG */

View file

@ -1335,4 +1335,14 @@ NTAPI
USB2_InitController(
IN PUSB2_HC_EXTENSION HcExtension);
VOID
NTAPI
USBPORT_DumpingEndpointProperties(
IN PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties);
VOID
NTAPI
USBPORT_DumpingTtEndpoint(
IN PUSB2_TT_ENDPOINT TtEndpoint);
#endif /* USBPORT_H__ */