mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
Add function to print a number with grouped digits
Move bootstage's numbering printing code into a generic place so that it can be used by tracing also. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5d3bd34545
commit
b8bcaa3ad3
3 changed files with 31 additions and 18 deletions
|
@ -178,4 +178,15 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
|
|||
#define vscnprintf(buf, size, fmt, args...) vsprintf(buf, fmt, ##args)
|
||||
#endif /* CONFIG_SYS_VSNPRINTF */
|
||||
|
||||
/**
|
||||
* print_grouped_ull() - print a value with digits grouped by ','
|
||||
*
|
||||
* This prints a value with grouped digits, like 12,345,678 to make it easier
|
||||
* to read.
|
||||
*
|
||||
* @val: Value to print
|
||||
* @digits: Number of digiits to print
|
||||
*/
|
||||
void print_grouped_ull(unsigned long long int_val, int digits);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue