summaryrefslogtreecommitdiff
path: root/apps/system/i2c/i2c_common.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-30 17:20:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-30 17:20:46 +0000
commit7b01904121be6cb88d28005a77da9c1815593925 (patch)
tree934fbe483e0599843e1be72fe93882b90cde810b /apps/system/i2c/i2c_common.c
parentf62cc877bdb5e731e099aa45c8774c5d5892c672 (diff)
downloadnuttx-7b01904121be6cb88d28005a77da9c1815593925.tar.gz
nuttx-7b01904121be6cb88d28005a77da9c1815593925.tar.bz2
nuttx-7b01904121be6cb88d28005a77da9c1815593925.zip
Initial debug changes to the I2C tool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3929 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/system/i2c/i2c_common.c')
-rw-r--r--apps/system/i2c/i2c_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/system/i2c/i2c_common.c b/apps/system/i2c/i2c_common.c
index 1a97e40b6..a04f7769a 100644
--- a/apps/system/i2c/i2c_common.c
+++ b/apps/system/i2c/i2c_common.c
@@ -86,7 +86,7 @@ int common_args(FAR struct i2ctool_s *i2ctool, FAR char **arg)
goto invalid_argument;
}
- switch (ptr[0])
+ switch (ptr[1])
{
case 'a':
ret = arg_hex(arg, &value);
@@ -151,11 +151,11 @@ int common_args(FAR struct i2ctool_s *i2ctool, FAR char **arg)
}
invalid_argument:
- i2ctool_printf(i2ctool, g_i2carginvalid, arg);
+ i2ctool_printf(i2ctool, g_i2carginvalid, ptr);
return ERROR;
out_of_range:
- i2ctool_printf(i2ctool, g_i2cargrange, arg);
+ i2ctool_printf(i2ctool, g_i2cargrange, ptr);
return ERROR;
}