ReactOS 0.4.15-dev-7928-g68a8619
dbg_ehci.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS USB EHCI Miniport Driver
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: USBEHCI debugging declarations
5 * COPYRIGHT: Copyright 2017-2018 Vadim Galyant <vgal@rambler.ru>
6 */
7
8#ifndef DBG_EHCI_H__
9#define DBG_EHCI_H__
10
11#if DBG
12
13 #ifndef NDEBUG_EHCI_TRACE
14 #define DPRINT_EHCI(fmt, ...) do { \
15 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
16 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
17 } while (0)
18 #else
19 #if defined(_MSC_VER)
20 #define DPRINT_EHCI __noop
21 #else
22 #define DPRINT_EHCI(...) do {if(0) {DbgPrint(__VA_ARGS__);}} while(0)
23 #endif
24 #endif
25
26 #ifndef NDEBUG_EHCI_ROOT_HUB
27 #define DPRINT_RH(fmt, ...) do { \
28 if (DbgPrint("(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)) \
29 DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \
30 } while (0)
31 #else
32 #if defined(_MSC_VER)
33 #define DPRINT_RH __noop
34 #else
35 #define DPRINT_RH(...) do {if(0) {DbgPrint(__VA_ARGS__);}} while(0)
36 #endif
37 #endif
38
39#else /* not DBG */
40
41 #if defined(_MSC_VER)
42 #define DPRINT_EHCI __noop
43 #define DPRINT_RH __noop
44 #else
45 #define DPRINT_EHCI(...) do {if(0) {DbgPrint(__VA_ARGS__);}} while(0)
46 #define DPRINT_RH(...) do {if(0) {DbgPrint(__VA_ARGS__);}} while(0)
47 #endif /* _MSC_VER */
48
49#endif /* not DBG */
50
51#endif /* DBG_EHCI_H__ */