summaryrefslogtreecommitdiff
path: root/avr/debug.h
diff options
context:
space:
mode:
authorLeo C2014-07-03 00:04:41 +0200
committerLeo C2014-07-03 00:04:41 +0200
commite7895944926367a5c98313f7a52aef1c65dde254 (patch)
treea287061f09347d5ba9d5adaffdbfcfc93857820d /avr/debug.h
parent071402f056bc1633be44e2c5c0e4697a5c49fc21 (diff)
downloadz180-stamp-e7895944926367a5c98313f7a52aef1c65dde254.zip
Tupfile
Diffstat (limited to 'avr/debug.h')
-rw-r--r--avr/debug.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/avr/debug.h b/avr/debug.h
index 39ae55c..c341301 100644
--- a/avr/debug.h
+++ b/avr/debug.h
@@ -2,8 +2,11 @@
#ifndef DEBUG_H_
#define DEBUG_H_
+#include <avr/pgmspace.h>
+
#ifdef DEBUG
-#define DBG_P(lvl, ...) if (DEBUG>=lvl) fprintf_P( stderr, __VA_ARGS__ )
+#define DBG_P(lvl, format, ...) if (DEBUG>=lvl) \
+ fprintf_P( stderr, PSTR(format), ##__VA_ARGS__ )
#else
#define DBG_P(lvl, ...)
#endif