shell: Make sure digits of the device id are rendered with 2 hex digits
This is achieved by a simple change to the formatter, fixing it to 2 hex digits with 0 padding. Signed-off-by: Daniel Egger <daniel@eggers-club.de>
This commit is contained in:
parent
46c19ff18f
commit
d4d75eb1da
|
@ -30,7 +30,7 @@ static int cmd_get_device_id(const struct shell *shell, size_t argc, char **argv
|
|||
shell_fprintf(shell, SHELL_NORMAL, "ID: 0x");
|
||||
|
||||
for (i = 0 ; i < length ; i++) {
|
||||
shell_fprintf(shell, SHELL_NORMAL, "%x", dev_id[i]);
|
||||
shell_fprintf(shell, SHELL_NORMAL, "%02x", dev_id[i]);
|
||||
}
|
||||
|
||||
shell_fprintf(shell, SHELL_NORMAL, "\n");
|
||||
|
|
Loading…
Reference in a new issue