RTEMS: bsps/include/grlib/debug_defs.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
debug_defs.h
Go to the documentation of this file.
1
6#ifndef __DEBUG_DEFS_H__
7#define __DEBUG_DEFS_H__
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13
14#ifdef DEBUG
15
16 #ifndef DEBUG_FLAGS
17 #define DEBUG_FLAGS 0
18 #endif
19
20 #define DBG(fmt, args...) do { printk(" : %03d @ %18s()]:" fmt , __LINE__,__FUNCTION__,## args); } while(0)
21 #define DBG2(fmt) do { printk(" : %03d @ %18s()]:" fmt , __LINE__,__FUNCTION__); } while(0)
22 #define DBGC(c,fmt, args...) do { if (DEBUG_FLAGS & c) { printk(" : %03d @ %18s()]:" fmt , __LINE__,__FUNCTION__,## args); }} while(0)
23
24#else
25
26 #define DBG(fmt, args...)
27 #define DBG2(fmt, args...)
28 #define DBGC(c, fmt, args...)
29
30#endif
31
32#ifdef DEBUGFUNCS
33 #define FUNCDBG() do { printk("%s\n\r",__FUNCTION__); } while(0)
34#else
35 #define FUNCDBG()
36#endif
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif /* __DEBUG_DEFS_H__ */