]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fixed docs/newbs_testing_debugging.md and tmk_core/common/print.h
authormtei <2170248+mtei@users.noreply.github.com>
Fri, 5 Oct 2018 05:54:22 +0000 (14:54 +0900)
committerJack Humbert <jack.humb@gmail.com>
Tue, 27 Nov 2018 19:40:19 +0000 (14:40 -0500)
docs/newbs_testing_debugging.md
tmk_core/common/print.h

index 1d8021dec8f16c32032bc24c65ee64e166ec4a47..45509110a557f0bb0e4920dc75d08f32960d70d5 100644 (file)
@@ -28,6 +28,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus
 After that you can use a few different print functions:
 
 * `print("string")`: Print a simple string.
-* `sprintf("%s string", var)`: Print a formatted string
+* `uprintf("%s string", var)`: Print a formatted string
 * `dprint("string")` Print a simple string, but only when debug mode is enabled
 * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
index 06c6cbd7f1664e6a0932da9adbd48381f627409d..2d7184bd0d40db924121fc8e3e3755bd575fd504 100644 (file)
@@ -60,7 +60,7 @@
 #    define println(s)         xputs(PSTR(s "\r\n"))
 #    define uprint(s)          print(s)
 #    define uprintln(s)        println(s)
-#    define uprintf(fmt, ...)  xprintf(fmt, ...)
+#    define uprintf(fmt, ...)  xprintf(fmt, ##__VA_ARGS__)
 
 #  endif /* USER_PRINT / NORMAL PRINT */
 
@@ -125,7 +125,7 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
 #    define println(s)         xprintf(s "\r\n")
 #    define uprint(s)          print(s)
 #    define uprintln(s)        println(s)
-#    define uprintf(fmt, ...)  xprintf(fmt, ...)
+#    define uprintf(fmt, ...)  xprintf(fmt, ##__VA_ARGS__)
 
 #  endif /* USER_PRINT / NORMAL PRINT */
 
@@ -141,19 +141,19 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
 #    define xprintf(fmt, ...)
 
 // Create user print defines
-#    define uprintf(fmt, ...)  __xprintf(fmt, ...)
+#    define uprintf(fmt, ...)  __xprintf(fmt, ##__VA_ARGS__)
 #    define uprint(s)          xprintf(s)
 #    define uprintln(s)        xprintf(s "\r\n")
 
 #  else /* NORMAL PRINT */
 
 // Create user & normal print defines
-#    define xprintf(fmt, ...)  __xprintf(fmt, ...)
+#    define xprintf(fmt, ...)  __xprintf(fmt, ##__VA_ARGS__)
 #    define print(s)           xprintf(s)
 #    define println(s)         xprintf(s "\r\n")
 #    define uprint(s)          print(s)
 #    define uprintln(s)        println(s)
-#    define uprintf(fmt, ...)  xprintf(fmt, ...)
+#    define uprintf(fmt, ...)  xprintf(fmt, ##__VA_ARGS__)
 
 #  endif /* USER_PRINT / NORMAL PRINT */