revert commit 56204.
[AROS.git] / rom / usb / classes / hub / debug.h
blobec279a32bdd102125c6651f8bbe2a1b4dd30973d
1 #ifndef __DEBUG_H__
2 #define __DEBUG_H__
4 #ifndef DB_LEVEL
5 #define DB_LEVEL 2
6 #endif
8 //#define DEBUG 1
10 #include <proto/debug.h>
12 // DEBUG 0 should equal undefined DEBUG
13 #ifdef DEBUG
14 #if DEBUG == 0
15 #undef DEBUG
16 #endif
17 #endif
19 #ifdef DEBUG
20 #define KPRINTF(l, x) do { if ((l) >= DB_LEVEL) \
21 { KPrintF("%s:%s/%lu: ", __FILE__, __FUNCTION__, __LINE__); KPrintF x;} } while (0)
22 #define DB(x) x
23 void dumpmem(void *mem, unsigned long int len);
24 #else /* !DEBUG */
26 #define KPRINTF(l, x) ((void) 0)
27 #define DB(x)
29 #endif /* DEBUG */
31 #endif /* __DEBUG_H__ */