zephyr/tests/kernel/test_common/src
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
..
atomic.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00
bitfield.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00
byteorder.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00
intmath.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00
main.c tests: only run the printk test if CONFIG_PRINTK is enabled 2016-11-03 19:20:19 +00:00
Makefile tests: only run the printk test if CONFIG_PRINTK is enabled 2016-11-03 19:20:19 +00:00
printk.c printk: Add basic support for width modifier and zero padding 2016-11-27 19:26:55 +00:00
rand32.c tests: common: add rand32 test 2016-11-01 13:42:17 -04:00
ring_buf.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00
slist.c tests: move individual common tests into one test 2016-11-01 13:42:17 -04:00