summaryrefslogtreecommitdiff
path: root/nuttx/drivers/input
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-07 22:37:24 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-07 22:37:24 +0000
commit77fac8557262940319c3fa3bc473866d4bb90450 (patch)
treef6a1df9d8409cbb2e66bacb04f7aaeb344800d3a /nuttx/drivers/input
parent3ae6dd3bf850269d0b55c842d463d028071cd496 (diff)
downloadpx4-nuttx-77fac8557262940319c3fa3bc473866d4bb90450.tar.gz
px4-nuttx-77fac8557262940319c3fa3bc473866d4bb90450.tar.bz2
px4-nuttx-77fac8557262940319c3fa3bc473866d4bb90450.zip
SAM3U SPI debug changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4031 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/input')
-rw-r--r--nuttx/drivers/input/ads7843e.c12
-rw-r--r--nuttx/drivers/input/ads7843e.h6
-rw-r--r--nuttx/drivers/input/tsc2007.c2
3 files changed, 3 insertions, 17 deletions
diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c
index 16842f4cf..1e04de37c 100644
--- a/nuttx/drivers/input/ads7843e.c
+++ b/nuttx/drivers/input/ads7843e.c
@@ -192,9 +192,7 @@ static void ads7843e_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_ADS7843E_SPIMODE);
SPI_SETBITS(spi, 8);
-#ifdef CONFIG_ADS7843E_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY);
-#endif
}
#endif
@@ -256,12 +254,8 @@ static void ads7843e_deselect(FAR struct spi_dev_s *spi)
static inline void ads7843e_configspi(FAR struct spi_dev_s *spi)
{
-#ifdef CONFIG_ADS7843E_FREQUENCY
idbg("Mode: %d Bits: 8 Frequency: %d\n",
CONFIG_ADS7843E_SPIMODE, CONFIG_ADS7843E_FREQUENCY);
-#else
- idbg("Mode: %d Bits: 8\n", CONFIG_ADS7843E_SPIMODE);
-#endif
/* Configure SPI for the P14201. But only if we own the SPI bus. Otherwise, don't
* bother because it might change.
@@ -271,9 +265,7 @@ static inline void ads7843e_configspi(FAR struct spi_dev_s *spi)
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, true);
SPI_SETMODE(spi, CONFIG_ADS7843E_SPIMODE);
SPI_SETBITS(spi, 8);
-#ifdef CONFIG_ADS7843E_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY)
-#endif
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, false);
#endif
}
@@ -1110,10 +1102,6 @@ int ads7843e_register(FAR struct spi_dev_s *dev,
sem_init(&priv->devsem, 0, 1); /* Initialize device structure semaphore */
sem_init(&priv->waitsem, 0, 0); /* Initialize pen event wait semaphore */
- /* Set the SPI frequency (saving the actual frequency) */
-
- config->frequency = SPI_SETFREQUENCY(dev, config->frequency);
-
/* Make sure that interrupts are disabled */
config->clear(config);
diff --git a/nuttx/drivers/input/ads7843e.h b/nuttx/drivers/input/ads7843e.h
index 17671aefd..edf205c61 100644
--- a/nuttx/drivers/input/ads7843e.h
+++ b/nuttx/drivers/input/ads7843e.h
@@ -2,7 +2,7 @@
* drivers/input/ads7843e.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
* "Touch Screen Controller, ADS7843," Burr-Brown Products from Texas
@@ -60,9 +60,7 @@
* Pre-Processor Definitions
********************************************************************************************/
/* Configuration ****************************************************************************/
-/* Reference counting is partially implemented, but not needed in the
- * current design.
- */
+/* Reference counting is partially implemented, but not needed in the current design. */
#undef CONFIG_ADS7843E_REFCNT
diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c
index 61b48fbd4..12f3dc9c3 100644
--- a/nuttx/drivers/input/tsc2007.c
+++ b/nuttx/drivers/input/tsc2007.c
@@ -445,7 +445,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
msg.addr = priv->config->address; /* 7-bit address */
msg.flags = I2C_M_READ; /* Read transaction, beginning with START */
- msg.buffer = data12; /* Transfer two this address */
+ msg.buffer = data12; /* Transfer to this address */
msg.length = 2; /* Read two bytes following the address */
ret = I2C_TRANSFER(priv->i2c, &msg, 1);