diff options
Diffstat (limited to 'avr/debug.h')
-rw-r--r-- | avr/debug.h | 5 |
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 |