ReactOS
0.4.15-dev-2095-g7caf9e9
dbg_uhub.h
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS USB Hub Driver
3
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4
* PURPOSE: USBHub debugging declarations
5
* COPYRIGHT: Copyright 2017 Vadim Galyant <vgal@rambler.ru>
6
*/
7
8
#ifndef DBG_UHUB_H__
9
#define DBG_UHUB_H__
10
11
#if DBG
12
13
#ifndef NDEBUG_USBHUB_IOCTL
14
15
#define DPRINT_IOCTL(fmt, ...) do { \
16
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
17
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
18
} while (0)
19
20
#else
21
22
#if defined(_MSC_VER)
23
#define DPRINT_IOCTL __noop
24
#else
25
#define DPRINT_IOCTL(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
26
#endif
27
28
#endif
29
30
#ifndef NDEBUG_USBHUB_POWER
31
32
#define DPRINT_PWR(fmt, ...) do { \
33
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
34
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
35
} while (0)
36
37
#else
38
39
#if defined(_MSC_VER)
40
#define DPRINT_PWR __noop
41
#else
42
#define DPRINT_PWR(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
43
#endif
44
45
#endif
46
47
#ifndef NDEBUG_USBHUB_PNP
48
49
#define DPRINT_PNP(fmt, ...) do { \
50
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
51
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
52
} while (0)
53
54
#else
55
56
#if defined(_MSC_VER)
57
#define DPRINT_PNP __noop
58
#else
59
#define DPRINT_PNP(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
60
#endif
61
62
#endif
63
64
#ifndef NDEBUG_USBHUB_SCE
65
66
#define DPRINT_SCE(fmt, ...) do { \
67
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
68
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
69
} while (0)
70
71
#else
72
73
#if defined(_MSC_VER)
74
#define DPRINT_SCE __noop
75
#else
76
#define DPRINT_SCE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
77
#endif
78
79
#endif
80
81
#ifndef NDEBUG_USBHUB_ENUM
82
83
#define DPRINT_ENUM(fmt, ...) do { \
84
if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
85
DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
86
} while (0)
87
88
#else
89
90
#if defined(_MSC_VER)
91
#define DPRINT_ENUM __noop
92
#else
93
#define DPRINT_ENUM(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
94
#endif
95
96
#endif
97
98
#else
/* not DBG */
99
100
#if defined(_MSC_VER)
101
#define DPRINT_IOCTL __noop
102
#define DPRINT_PWR __noop
103
#define DPRINT_PNP __noop
104
#define DPRINT_SCE __noop
105
#define DPRINT_ENUM __noop
106
#else
107
#define DPRINT_IOCTL(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
108
#define DPRINT_PWR(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
109
#define DPRINT_PNP(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
110
#define DPRINT_SCE(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
111
#define DPRINT_ENUM(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
112
#endif
/* _MSC_VER */
113
114
#endif
/* not DBG */
115
116
#endif
/* DBG_UHUB_H__ */
drivers
usb
usbhub
dbg_uhub.h
Generated on Sat Feb 27 2021 06:08:23 for ReactOS by
1.8.15