diff options
| author | Tom Rini <trini@konsulko.com> | 2019-07-21 15:40:21 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-07-21 15:40:21 -0400 |
| commit | 79ea03b38a8e9a4488473b5ee57f3fab8d360f17 (patch) | |
| tree | d9dd81471cdc0b36b3e1b8596b9e7bd333a56843 /include/debug_uart.h | |
| parent | a7e617af88d8eafde2ad2ead610ffe6d68322711 (diff) | |
| parent | 8b1ceb0ac1aa1746c6751d698ce7a012a236fa65 (diff) | |
| download | u-boot-79ea03b38a8e9a4488473b5ee57f3fab8d360f17.tar.gz u-boot-79ea03b38a8e9a4488473b5ee57f3fab8d360f17.tar.xz u-boot-79ea03b38a8e9a4488473b5ee57f3fab8d360f17.zip | |
Merge tag 'rockchip-for-v2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- rk3399 lpddr4 support
- rk3399-rock960 board support improvement
- Eliminate pyelftools dependency by make_fit_atf.py
- clean up rockchip dts to use -u-boot.dtsi
- use ARM arch/generic timer instead of rk_timer
- clean up Kconfig options for board support
Diffstat (limited to 'include/debug_uart.h')
| -rw-r--r-- | include/debug_uart.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h index 34e8b2fc81..cd70ae1a04 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -104,6 +104,13 @@ void printhex4(uint value); */ void printhex8(uint value); +/** + * printdec() - Output a decimalism value + * + * @value: Value to output + */ +void printdec(uint value); + #ifdef CONFIG_DEBUG_UART_ANNOUNCE #define _DEBUG_UART_ANNOUNCE printascii("<debug_uart> "); #else @@ -171,6 +178,18 @@ void printhex8(uint value); printhex(value, 8); \ } \ \ + void printdec(uint value) \ + { \ + if (value > 10) { \ + printdec(value / 10); \ + value %= 10; \ + } else if (value == 10) { \ + _debug_uart_putc('1'); \ + value = 0; \ + } \ + _debug_uart_putc('0' + value); \ + } \ +\ void debug_uart_init(void) \ { \ board_debug_uart_init(); \ |
