diff options
author | Joel Challis <[email protected]> | 2024-01-27 04:30:29 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-27 04:30:29 +0000 |
commit | bb711456329beda1ab8573fbac3ad51bd398872b (patch) | |
tree | f1b2a4ac2ee53f02006e631323eb57850e7bd50e /quantum/logging/debug.h | |
parent | f2299ee5f8560b7bae82229d92e9039288149a16 (diff) | |
download | qmk_firmware-bb711456329beda1ab8573fbac3ad51bd398872b.tar.gz qmk_firmware-bb711456329beda1ab8573fbac3ad51bd398872b.zip |
Tidy up print/debug logging headers (#22969)
Diffstat (limited to 'quantum/logging/debug.h')
-rw-r--r-- | quantum/logging/debug.h | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/quantum/logging/debug.h b/quantum/logging/debug.h index 25d57b156b..017f9b9181 100644 --- a/quantum/logging/debug.h +++ b/quantum/logging/debug.h @@ -54,26 +54,14 @@ extern debug_config_t debug_config; * Debug print utils */ #ifndef NO_DEBUG - -# define dprint(s) \ - do { \ - if (debug_enable) print(s); \ - } while (0) -# define dprintln(s) \ - do { \ - if (debug_enable) println(s); \ +# define dprintf(fmt, ...) \ + do { \ + if (debug_config.enable) xprintf(fmt, ##__VA_ARGS__); \ } while (0) -# define dprintf(fmt, ...) \ - do { \ - if (debug_enable) xprintf(fmt, ##__VA_ARGS__); \ - } while (0) -# define dmsg(s) dprintf("%s at %d: %s\n", __FILE__, __LINE__, s) - #else /* NO_DEBUG */ - -# define dprint(s) -# define dprintln(s) # define dprintf(fmt, ...) -# define dmsg(s) - #endif /* NO_DEBUG */ + +#define dprint(s) dprintf(s) +#define dprintln(s) dprintf(s "\r\n") +#define dmsg(s) dprintf("%s at %d: %s\n", __FILE__, __LINE__, s) |