diff options
author | Joel Challis <git@zvecr.com> | 2019-10-15 13:33:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 13:33:06 +0100 |
commit | 2ac4197b73221a49cfb7c9a44c4674d757ad7aba (patch) | |
tree | 064117b6947c3f0c71f04a74390f9d7eab2e945a | |
parent | cc5edb9eeb2d30400dee278a6f20991389f68afe (diff) | |
download | qmk_firmware-2ac4197b73221a49cfb7c9a44c4674d757ad7aba.tar.gz qmk_firmware-2ac4197b73221a49cfb7c9a44c4674d757ad7aba.zip |
Add binary support to tinyprintf (#7024)
-rw-r--r-- | tmk_core/common/chibios/printf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c index dbd059448c..dcf33f35f8 100644 --- a/tmk_core/common/chibios/printf.c +++ b/tmk_core/common/chibios/printf.c @@ -186,6 +186,15 @@ void tfp_format(void* putp, putcf putf, char* fmt, va_list va) { case 's': putchw(putp, putf, w, 0, va_arg(va, char*)); break; + case 'b': +#ifdef PRINTF_LONG_SUPPORT + if (lng) + uli2a(va_arg(va, unsigned long int), 2, 0, bf); + else +#endif + ui2a(va_arg(va, unsigned int), 2, 0, bf); + putchw(putp, putf, w, lz, bf); + break; case '%': putf(putp, ch); default: |