diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 11:26:13 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 11:26:13 -0600 |
commit | af5f00732d9551dca5040b18b822393ef27081c1 (patch) | |
tree | 3ca709f95b1c4be493defa9942df1319e2afcfab /apps/system/i2c/i2c_get.c | |
parent | 83e277d271a43f4d8be5dd2eb042a920dc96e10c (diff) | |
download | nuttx-af5f00732d9551dca5040b18b822393ef27081c1.tar.gz nuttx-af5f00732d9551dca5040b18b822393ef27081c1.tar.bz2 nuttx-af5f00732d9551dca5040b18b822393ef27081c1.zip |
Update the displayed I2C on each get iteraction (not the same starting address). From Ryan VanSickle
Diffstat (limited to 'apps/system/i2c/i2c_get.c')
-rw-r--r-- | apps/system/i2c/i2c_get.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/system/i2c/i2c_get.c b/apps/system/i2c/i2c_get.c index 08510af4b..f2c16d4a7 100644 --- a/apps/system/i2c/i2c_get.c +++ b/apps/system/i2c/i2c_get.c @@ -164,7 +164,8 @@ int i2ccmd_get(FAR struct i2ctool_s *i2ctool, int argc, FAR char **argv) if (ret == OK) { i2ctool_printf(i2ctool, "READ Bus: %d Addr: %02x Subaddr: %02x Value: ", - i2ctool->bus, i2ctool->addr, i2ctool->regaddr); + i2ctool->bus, i2ctool->addr, regaddr); + if (i2ctool->width == 8) { i2ctool_printf(i2ctool, "%02x\n", result); |