zephyr/tests/kernel
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
..
test_arm_irq_vector_table tests: fix filter for cortex-m3/m4 2016-11-11 21:37:52 +00:00
test_bitfield samples: tests: remove obsolete KERNEL_TYPE and kernel variables 2016-11-04 15:47:25 -04:00
test_build tests: test CONFIG_KERNEL_DEBUG and CONFIG_ASSERT 2016-11-18 23:08:48 +00:00
test_common printk: Add basic support for width modifier and zero padding 2016-11-27 19:26:55 +00:00
test_ipm drivers: update ipm driver to use unified kernel 2016-11-13 13:53:53 +00:00
test_multilib tests/multilib: Update README file 2016-11-26 10:46:10 +00:00
test_sprintf samples: tests: remove obsolete KERNEL_TYPE and kernel variables 2016-11-04 15:47:25 -04:00
test_xip samples: tests: remove obsolete KERNEL_TYPE and kernel variables 2016-11-04 15:47:25 -04:00