projects
/
librfid
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
27585a4
)
redirect DEBUGP to 'debugp' function inside openpcd firmware
author
Harald Welte
<laforge@gnumonks.org>
Sat, 14 Oct 2006 21:51:24 +0000
(21:51 +0000)
committer
Harald Welte
<laforge@gnumonks.org>
Sat, 14 Oct 2006 21:51:24 +0000
(21:51 +0000)
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1909
e0336214
-984f-0b4b-a45f-
81c69e1f0ede
include/librfid/rfid.h
patch
|
blob
|
history
diff --git
a/include/librfid/rfid.h
b/include/librfid/rfid.h
index
f0ecc16
..
0b98be6
100644
(file)
--- a/
include/librfid/rfid.h
+++ b/
include/librfid/rfid.h
@@
-13,17
+13,30
@@
enum rfid_frametype {
RFID_MIFARE_FRAME,
};
RFID_MIFARE_FRAME,
};
-//#define DEBUG
+#define DEBUG_LIBRFID
-#ifdef DEBUG
+#ifdef DEBUG_LIBRFID
+
+#ifdef LIBRFID_FIRMWARE
+extern void debugp(const char *format, ...);
+extern const char *hexdump(const void *data, unsigned int len);
+#define rfid_hexdump(x, y) hexdump(x, y)
+#define DEBUGP(x, args ...) debugp("%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
+#define DEBUGPC(x, args ...) debugp(x, ## args)
+#else /* LIBRFID_FIRMWARE */
+extern const char *rfid_hexdump(const void *data, unsigned int len);
#define DEBUGP(x, args ...) fprintf(stderr, "%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
#define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
#define DEBUGP(x, args ...) fprintf(stderr, "%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
#define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
-#else
+#endif /* LIBRFID_FIRMWARE */
+
+#else /* DEBUG */
+extern const char *rfid_hexdump(const void *data, unsigned int len);
+
#define DEBUGP(x, args ...)
#define DEBUGPC(x, args ...)
#define DEBUGP(x, args ...)
#define DEBUGPC(x, args ...)
-#endif
-extern const char *rfid_hexdump(const void *data, unsigned int len);
+#endif /* DEBUG */
+
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))