X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Fdebug.h;h=1d631c39eedd7484c70f164aa31ff26338d524ee;hb=421e7d6da138dc122cf33791f3631156f73cccd7;hp=5cb6861e6cb8c67f4f3ff47e102a63a8271a0bee;hpb=a75a9ccb67defc791ccf9fdf73d4e149436dae3f;p=sigrok-firmware-fx2lafw.git diff --git a/include/debug.h b/include/debug.h index 5cb6861e..1d631c39 100644 --- a/include/debug.h +++ b/include/debug.h @@ -20,43 +20,30 @@ #ifdef DEBUG -#define ERRF(fmt, ...) \ - do { debugf("E " fmt, __VA_ARGS__); \ - while(1); } while(0) -#define ERR(msg) \ - ERRF("%s", msg) - -#define WARNF(fmt, ...) \ - debugf("W " fmt, __VA_ARGS__) -#define WARN(msg) \ - WARNF("%s", msg) - -#define INFOF(fmt, ...) \ - debugf("I " fmt, __VA_ARGS__) -#define INFO(msg) \ - INFOF("%s", msg) +#define ERRF(fmt, ...) do { debugf("E " fmt, __VA_ARGS__); \ + while(1); } while(0) +#define ERR(msg) ERRF("%s", msg) + +#define WARNF(fmt, ...) debugf("W " fmt, __VA_ARGS__) +#define WARN(msg) WARNF("%s", msg) + +#define INFOF(fmt, ...) debugf("I " fmt, __VA_ARGS__) +#define INFO(msg) INFOF("%s", msg) /** - * A printf the prints messages through the UART - * EP6. + * A printf that prints messages through EP6. */ void debugf(const char *format, ...); #else -#define ERRF(fmt, ...) \ - ((void) 0) -#define ERR(msg) \ - ((void) 0) +#define ERRF(fmt, ...) ((void)0) +#define ERR(msg) ((void)0) -#define WARNF(fmt, ...) \ - ((void) 0) -#define WARN(msg) \ - ((void) 0) +#define WARNF(fmt, ...) ((void)0) +#define WARN(msg) ((void)0) -#define INFOF(fmt, ...) \ - ((void) 0) -#define INFO(msg) \ - ((void) 0) +#define INFOF(fmt, ...) ((void)0) +#define INFO(msg) ((void)0) #endif