diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 16:58:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-05-08 16:58:10 -0600 |
commit | faa1f56b5d4ea2e756b8ab44563d1fb68f7595e1 (patch) | |
tree | 8a50251f2e5378bb39e1d7d88cd3969bce0ab9db /apps/system/i2c | |
parent | af5f00732d9551dca5040b18b822393ef27081c1 (diff) | |
download | px4-nuttx-faa1f56b5d4ea2e756b8ab44563d1fb68f7595e1.tar.gz px4-nuttx-faa1f56b5d4ea2e756b8ab44563d1fb68f7595e1.tar.bz2 px4-nuttx-faa1f56b5d4ea2e756b8ab44563d1fb68f7595e1.zip |
P-code BINFMT: Add logic to pass information from the binfmt logic to the P-code interpreter. This includes some extension to the binfmt interfaces.
Diffstat (limited to 'apps/system/i2c')
-rw-r--r-- | apps/system/i2c/i2c_get.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/system/i2c/i2c_get.c b/apps/system/i2c/i2c_get.c index f2c16d4a7..c30fa9a24 100644 --- a/apps/system/i2c/i2c_get.c +++ b/apps/system/i2c/i2c_get.c @@ -46,7 +46,7 @@ #include "i2ctool.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -108,6 +108,7 @@ int i2ccmd_get(FAR struct i2ctool_s *i2ctool, int argc, FAR char **argv) { return ERROR; } + argndx += nargs; } @@ -217,6 +218,7 @@ int i2ctool_get(FAR struct i2ctool_s *i2ctool, FAR struct i2c_dev_s *dev, msg[1].addr = i2ctool->addr; msg[1].flags = I2C_M_READ; + if (i2ctool->width == 8) { msg[1].buffer = &u.data8; @@ -254,5 +256,6 @@ int i2ctool_get(FAR struct i2ctool_s *i2ctool, FAR struct i2c_dev_s *dev, *result = u.data16; } } + return ret; } |