diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-29 16:07:29 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-29 16:07:29 +0000 |
commit | 3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb (patch) | |
tree | 071f95f8219d83fc1992dcbb5eb5c2b9e2cc782c /nuttx/drivers/input | |
parent | 0671167e2a192d26fd43efa2130c4fccc32b76b8 (diff) | |
download | px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.tar.gz px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.tar.bz2 px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.zip |
Bug fixes for BCH and TSC2007 drivers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3921 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/input')
-rw-r--r-- | nuttx/drivers/input/tsc2007.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c index 4a5082f08..25c748823 100644 --- a/nuttx/drivers/input/tsc2007.c +++ b/nuttx/drivers/input/tsc2007.c @@ -460,7 +460,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd) */ ret = (unsigned int)data12[0] << 4 | (unsigned int)data12[1] >> 4; - ivdbg(&tsc->client->dev, "data: 0x%04x\n", ret); + ivdbg("data: 0x%04x\n", ret); return ret; } @@ -579,7 +579,7 @@ static void tsc2007_worker(FAR void *arg) pressure = (x * config->rxplate * (z2 - z1)) / z1; pressure = (pressure + 2048) >> 12; - ivdbg("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n" + ivdbg("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n", x, y, pressure, z1, z2); /* Ignore out of range caculcations */ @@ -1105,9 +1105,9 @@ int tsc2007_register(FAR struct i2c_dev_s *dev, /* Debug-only sanity checks */ - DEBUGASSERT(dev != NULL && config != NULL && minor > 0 && minor < 100); + DEBUGASSERT(dev != NULL && config != NULL && minor >= 0 && minor < 100); DEBUGASSERT((config->address & 0xfc) == 0x48); - DEBUGASSERT(config->attach != NULL && config->enable != NULL + DEBUGASSERT(config->attach != NULL && config->enable != NULL && config->clear != NULL && config->pendown != NULL); /* Create and initialize a TSC2007 device driver instance */ |