2008-12-23 20:25:15 +00:00
|
|
|
#ifndef _DEBUG_H
|
|
|
|
#define _DEBUG_H
|
|
|
|
|
2008-12-26 00:06:02 +00:00
|
|
|
#define DEBUG
|
|
|
|
|
2008-12-23 20:25:15 +00:00
|
|
|
#define DRLL 0x0001
|
|
|
|
#define DCC 0x0002
|
|
|
|
#define DMM 0x0004
|
|
|
|
#define DRR 0x0008
|
2008-12-26 00:06:02 +00:00
|
|
|
#define DRSL 0x0010
|
|
|
|
#define DNM 0x0020
|
2009-02-18 03:27:39 +00:00
|
|
|
|
2009-05-23 06:42:38 +00:00
|
|
|
#define DMNCC 0x0080
|
2008-12-27 21:45:37 +00:00
|
|
|
#define DSMS 0x0100
|
2008-12-29 04:06:41 +00:00
|
|
|
#define DPAG 0x0200
|
2009-06-27 00:53:10 +00:00
|
|
|
#define DMEAS 0x0400
|
2009-02-18 03:27:39 +00:00
|
|
|
|
2008-12-26 00:06:02 +00:00
|
|
|
#define DMI 0x1000
|
2008-12-27 17:02:56 +00:00
|
|
|
#define DMIB 0x2000
|
2009-02-18 03:27:39 +00:00
|
|
|
#define DMUX 0x4000
|
2009-05-01 14:59:07 +00:00
|
|
|
#define DINP 0x8000
|
2008-12-23 20:25:15 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2009-02-06 12:38:29 +00:00
|
|
|
#define DEBUGP(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ## args)
|
|
|
|
#define DEBUGPC(ss, fmt, args...) debugp(ss, __FILE__, __LINE__, 1, fmt, ## args)
|
2008-12-23 20:25:15 +00:00
|
|
|
#else
|
2008-12-26 10:20:07 +00:00
|
|
|
#define DEBUGP(xss, fmt, args...)
|
2009-02-06 12:38:29 +00:00
|
|
|
#define DEBUGPC(ss, fmt, args...)
|
2008-12-23 20:25:15 +00:00
|
|
|
#endif
|
|
|
|
|
2008-12-28 16:32:41 +00:00
|
|
|
#define static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
|
|
|
|
|
2009-02-28 13:08:01 +00:00
|
|
|
char *hexdump(unsigned char *buf, int len);
|
2009-02-06 12:38:29 +00:00
|
|
|
void debugp(unsigned int subsys, char *file, int line, int cont, const char *format, ...);
|
2008-12-27 12:46:49 +00:00
|
|
|
void debug_parse_category_mask(const char* mask);
|
2008-12-27 12:46:51 +00:00
|
|
|
void debug_use_color(int use_color);
|
2009-06-09 20:21:57 +00:00
|
|
|
void debug_timestamp(int enable);
|
2009-05-23 06:42:38 +00:00
|
|
|
extern unsigned int debug_mask;
|
2008-12-26 10:20:07 +00:00
|
|
|
|
2008-12-23 20:25:15 +00:00
|
|
|
#endif /* _DEBUG_H */
|