diff options
author | mtei <2170248+mtei@users.noreply.github.com> | 2018-10-05 14:54:22 +0900 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-11-27 14:40:19 -0500 |
commit | 90f9fb4eee0da25e5408e54ed872c6da2a40c5f3 (patch) | |
tree | 04e26740ca568094ab0905a6ebc5f55022b87e36 | |
parent | 77ed9e3a7305b1921d079e2facfb8e6d3d137e19 (diff) | |
download | qmk_firmware-90f9fb4eee0da25e5408e54ed872c6da2a40c5f3.tar.gz qmk_firmware-90f9fb4eee0da25e5408e54ed872c6da2a40c5f3.zip |
Fixed docs/newbs_testing_debugging.md and tmk_core/common/print.h
-rw-r--r-- | docs/newbs_testing_debugging.md | 2 | ||||
-rw-r--r-- | tmk_core/common/print.h | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 1d8021dec..45509110a 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md | |||
@@ -28,6 +28,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus | |||
28 | After that you can use a few different print functions: | 28 | After that you can use a few different print functions: |
29 | 29 | ||
30 | * `print("string")`: Print a simple string. | 30 | * `print("string")`: Print a simple string. |
31 | * `sprintf("%s string", var)`: Print a formatted string | 31 | * `uprintf("%s string", var)`: Print a formatted string |
32 | * `dprint("string")` Print a simple string, but only when debug mode is enabled | 32 | * `dprint("string")` Print a simple string, but only when debug mode is enabled |
33 | * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled | 33 | * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled |
diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h index 06c6cbd7f..2d7184bd0 100644 --- a/tmk_core/common/print.h +++ b/tmk_core/common/print.h | |||
@@ -60,7 +60,7 @@ | |||
60 | # define println(s) xputs(PSTR(s "\r\n")) | 60 | # define println(s) xputs(PSTR(s "\r\n")) |
61 | # define uprint(s) print(s) | 61 | # define uprint(s) print(s) |
62 | # define uprintln(s) println(s) | 62 | # define uprintln(s) println(s) |
63 | # define uprintf(fmt, ...) xprintf(fmt, ...) | 63 | # define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__) |
64 | 64 | ||
65 | # endif /* USER_PRINT / NORMAL PRINT */ | 65 | # endif /* USER_PRINT / NORMAL PRINT */ |
66 | 66 | ||
@@ -125,7 +125,7 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t)); | |||
125 | # define println(s) xprintf(s "\r\n") | 125 | # define println(s) xprintf(s "\r\n") |
126 | # define uprint(s) print(s) | 126 | # define uprint(s) print(s) |
127 | # define uprintln(s) println(s) | 127 | # define uprintln(s) println(s) |
128 | # define uprintf(fmt, ...) xprintf(fmt, ...) | 128 | # define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__) |
129 | 129 | ||
130 | # endif /* USER_PRINT / NORMAL PRINT */ | 130 | # endif /* USER_PRINT / NORMAL PRINT */ |
131 | 131 | ||
@@ -141,19 +141,19 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t)); | |||
141 | # define xprintf(fmt, ...) | 141 | # define xprintf(fmt, ...) |
142 | 142 | ||
143 | // Create user print defines | 143 | // Create user print defines |
144 | # define uprintf(fmt, ...) __xprintf(fmt, ...) | 144 | # define uprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) |
145 | # define uprint(s) xprintf(s) | 145 | # define uprint(s) xprintf(s) |
146 | # define uprintln(s) xprintf(s "\r\n") | 146 | # define uprintln(s) xprintf(s "\r\n") |
147 | 147 | ||
148 | # else /* NORMAL PRINT */ | 148 | # else /* NORMAL PRINT */ |
149 | 149 | ||
150 | // Create user & normal print defines | 150 | // Create user & normal print defines |
151 | # define xprintf(fmt, ...) __xprintf(fmt, ...) | 151 | # define xprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) |
152 | # define print(s) xprintf(s) | 152 | # define print(s) xprintf(s) |
153 | # define println(s) xprintf(s "\r\n") | 153 | # define println(s) xprintf(s "\r\n") |
154 | # define uprint(s) print(s) | 154 | # define uprint(s) print(s) |
155 | # define uprintln(s) println(s) | 155 | # define uprintln(s) println(s) |
156 | # define uprintf(fmt, ...) xprintf(fmt, ...) | 156 | # define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__) |
157 | 157 | ||
158 | # endif /* USER_PRINT / NORMAL PRINT */ | 158 | # endif /* USER_PRINT / NORMAL PRINT */ |
159 | 159 | ||