Skip to content

Commit

Permalink
Add binary support to tinyprintf (qmk#7024)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and Philip Karlsson committed Dec 3, 2019
1 parent 242930a commit 34c2e62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tmk_core/common/chibios/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 34c2e62

Please sign in to comment.