summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-01 23:08:27 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-01 23:08:27 +0000
commitc7049214583fe91d4cf3b72c7d3f2667a08dbc8e (patch)
tree60e6e8da9a6f537c5118f0816ef908df224cb3d9 /nuttx/drivers
parent10f4d1753d742ae90506116d9d0199930b4d5bc2 (diff)
downloadpx4-nuttx-c7049214583fe91d4cf3b72c7d3f2667a08dbc8e.tar.gz
px4-nuttx-c7049214583fe91d4cf3b72c7d3f2667a08dbc8e.tar.bz2
px4-nuttx-c7049214583fe91d4cf3b72c7d3f2667a08dbc8e.zip
Add comments that indicate that tsc2007_activate is probably not needed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4131 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/input/tsc2007.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c
index 910861af6..544cb1c79 100644
--- a/nuttx/drivers/input/tsc2007.c
+++ b/nuttx/drivers/input/tsc2007.c
@@ -83,6 +83,14 @@
#undef CONFIG_TSC2007_REFCNT
+/* I don't think that it is necessary to activate the converters before
+ * making meaurements. However, I will keep this functionality enabled
+ * until I have a change to prove that that activation is unnecessary.
+ */
+
+#undef CONFIG_TSC2007_ACTIVATE
+#define CONFIG_TSC2007_ACTIVATE 1
+
/* Driver support ***********************************************************/
/* This format is used to construct the /dev/input[n] device driver path. It
* defined here so that it will be used consistently in all places.
@@ -179,7 +187,9 @@ static int tsc2007_sample(FAR struct tsc2007_dev_s *priv,
FAR struct tsc2007_sample_s *sample);
static int tsc2007_waitsample(FAR struct tsc2007_dev_s *priv,
FAR struct tsc2007_sample_s *sample);
+#ifdef CONFIG_TSC2007_ACTIVATE
static int tsc2007_activate(FAR struct tsc2007_dev_s *priv, uint8_t cmd);
+#endif
static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd);
static void tsc2007_worker(FAR void *arg);
static int tsc2007_interrupt(int irq, FAR void *context);
@@ -405,6 +415,7 @@ errout:
* Name: tsc2007_activate
****************************************************************************/
+#ifdef CONFIG_TSC2007_ACTIVATE
static int tsc2007_activate(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
{
struct i2c_msg_s msg;
@@ -442,6 +453,9 @@ static int tsc2007_activate(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
}
return ret;
}
+#else
+# define tsc2007_activate(p,c)
+#endif
/****************************************************************************
* Name: tsc2007_transfer
@@ -1059,8 +1073,6 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
{
FAR struct inode *inode;
FAR struct tsc2007_dev_s *priv;
- pollevent_t eventset;
- int ndx;
int ret = OK;
int i;