zephyr/misc
Szymon Janc bde20d5447 printk: Add basic support for width modifier and zero padding
This adds basic support for width modifier when printing integers.
Supported specifiers are u,i,d,x,X. Width '*' is not supported.
Flag '0' for left-pading number with zero is also supported.

examples:
printk("0x%x 0x%02x 0x%04x 0x%08x\n", 1, 1, 1, 1);
0x1 0x01 0x0001 0x00000001

printk("0x%x 0x%2x 0x%4x 0x%8x\n", 1, 1, 1, 1);
0x1 0x 1 0x   1 0x       1

This should make printk usable for pretty printing u8 and u16 integers.

Change-Id: I58fa869e9c295a052f97fbf052291ef4d132811e
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2016-11-27 19:26:55 +00:00
..
debug kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
generated
cpp_ctors.c
cpp_dtors.c
cpp_init_array.c
cpp_virtual.c
cpp_vtable.cpp
Kconfig power_mgmt: Do not notify deep sleep if bootloader does context restore 2016-11-11 20:40:53 +00:00
Makefile
printk.c printk: Add basic support for width modifier and zero padding 2016-11-27 19:26:55 +00:00
reboot.c
ring_buffer.c