mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-20 13:41:45 +00:00
Add print_freq() to display frequencies nicely
Add a function similar to print_size() that works for frequencies. It can handle from Hz to GHz. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
2ea09c836f
commit
33eac2dc25
2 changed files with 53 additions and 0 deletions
|
@ -22,6 +22,17 @@
|
|||
*/
|
||||
void print_size(uint64_t size, const char *suffix);
|
||||
|
||||
/**
|
||||
* print_freq() - Print a frequency with a suffix
|
||||
*
|
||||
* Print frequencies as "x.xx GHz", "xxx KHz", etc as needed; allow for
|
||||
* optional trailing string (like "\n")
|
||||
*
|
||||
* @freq: Frequency to print in Hz
|
||||
* @suffix String to print after the frequency
|
||||
*/
|
||||
void print_freq(uint64_t freq, const char *suffix);
|
||||
|
||||
/**
|
||||
* print_buffer() - Print data buffer in hex and ascii form
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue