mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-10 22:19:29 +00:00
Add binary support to tinyprintf (#7024)
This commit is contained in:
parent
cc5edb9eeb
commit
2ac4197b73
1 changed files with 9 additions and 0 deletions
|
@ -186,6 +186,15 @@ void tfp_format(void* putp, putcf putf, char* fmt, va_list va) {
|
||||||
case 's':
|
case 's':
|
||||||
putchw(putp, putf, w, 0, va_arg(va, char*));
|
putchw(putp, putf, w, 0, va_arg(va, char*));
|
||||||
break;
|
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 '%':
|
case '%':
|
||||||
putf(putp, ch);
|
putf(putp, ch);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue