From 0bd8cef2e30f0a537057150f2a77a1e1f5b41c8b Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 15 Nov 2023 20:47:05 +0000 Subject: [PATCH] general: Defined macros that indicates when a DEBUG_ level is defined to be a no-op --- src/include/general.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/include/general.h b/src/include/general.h index 1c0d8cbb21a..a79f6b9f013 100644 --- a/src/include/general.h +++ b/src/include/general.h @@ -82,14 +82,22 @@ #define DEBUG_INFO(...) PLATFORM_PRINTF(__VA_ARGS__) #else #define DEBUG_ERROR(...) PRINT_NOOP(__VA_ARGS__) -#define DEBUG_WARN(...) PRINT_NOOP(__VA_ARGS__) -#define DEBUG_INFO(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_ERROR_IS_NOOP +#define DEBUG_WARN(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_WARN_IS_NOOP +#define DEBUG_INFO(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_INFO_IS_NOOP #endif -#define DEBUG_GDB(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_GDB(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_GDB_IS_NOOP #define DEBUG_TARGET(...) PRINT_NOOP(__VA_ARGS__) -#define DEBUG_PROTO(...) PRINT_NOOP(__VA_ARGS__) -#define DEBUG_PROBE(...) PRINT_NOOP(__VA_ARGS__) -#define DEBUG_WIRE(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_TARGET_IS_NOOP +#define DEBUG_PROTO(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_PROTO_IS_NOOP +#define DEBUG_PROBE(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_PROBE_IS_NOOP +#define DEBUG_WIRE(...) PRINT_NOOP(__VA_ARGS__) +#define DEBUG_WIRE_IS_NOOP void debug_serial_send_stdout(const uint8_t *data, size_t len); #else