mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software/bios/cmds/cmd_i2c: Fix i2c_scan output
"i2c_scan" prints random data instead of the intended slave address:
0x70: 10001ebc -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
instead of:
0x70: 70 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Fix this by adding the missing printf() parameter.
Fixes: ee1ea9baab
("bios/cmd/cmd_i2c: make results similar to Linux's i2cdetect.")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
b1cad93e62
commit
28ed06f1c5
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ static void i2c_scan_handler(int nb_params, char **params)
|
||||||
printf("\n0x%02x:", (slave_addr/0x10) * 0x10);
|
printf("\n0x%02x:", (slave_addr/0x10) * 0x10);
|
||||||
}
|
}
|
||||||
if (i2c_poll(slave_addr)) {
|
if (i2c_poll(slave_addr)) {
|
||||||
printf(" %02x");
|
printf(" %02x", slave_addr);
|
||||||
} else {
|
} else {
|
||||||
printf(" --");
|
printf(" --");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue