2 * PROJECT: ReactOS USB Port Driver
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: USBPort debugging declarations
5 * COPYRIGHT: Copyright 2017 Vadim Galyant <vgal@rambler.ru>
13 #ifndef NDEBUG_USBPORT_MINIPORT
15 #define DPRINT_MINIPORT(fmt, ...) do { \
16 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
17 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
23 #define DPRINT_MINIPORT __noop
25 #define DPRINT_MINIPORT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
30 #ifndef NDEBUG_USBPORT_CORE
32 #define DPRINT_CORE(fmt, ...) do { \
33 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
34 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
40 #define DPRINT_CORE __noop
42 #define DPRINT_CORE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
47 #ifndef NDEBUG_USBPORT_URB
49 #define DPRINT_URB(fmt, ...) do { \
50 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
51 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
57 #define DPRINT_URB __noop
59 #define DPRINT_URB(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
64 #ifndef NDEBUG_USBPORT_INTERRUPT
66 #define DPRINT_INT(fmt, ...) do { \
67 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
68 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
74 #define DPRINT_INT __noop
76 #define DPRINT_INT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
81 #ifndef NDEBUG_USBPORT_TIMER
83 #define DPRINT_TIMER(fmt, ...) do { \
84 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
85 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
91 #define DPRINT_TIMER __noop
93 #define DPRINT_TIMER(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
98 #ifndef NDEBUG_USBPORT_QUEUE
100 #define DPRINT_QUEUE(fmt, ...) do { \
101 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
102 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
107 #if defined(_MSC_VER)
108 #define DPRINT_QUEUE __noop
110 #define DPRINT_QUEUE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
117 #if defined(_MSC_VER)
118 #define DPRINT_MINIPORT __noop
119 #define DPRINT_CORE __noop
120 #define DPRINT_URB __noop
121 #define DPRINT_INT __noop
122 #define DPRINT_TIMER __noop
123 #define DPRINT_QUEUE __noop
125 #define DPRINT_MINIPORT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
126 #define DPRINT_CORE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
127 #define DPRINT_URB(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
128 #define DPRINT_INT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
129 #define DPRINT_TIMER(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
130 #define DPRINT_QUEUE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
131 #endif /* _MSC_VER */
135 #endif /* USBDEBUG_H__ */