SAM3U SPI debug changes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4031 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-10-07 22:37:24 +00:00
parent aabb21c85e
commit fb14c33e35
10 changed files with 61 additions and 34 deletions
-12
View File
@@ -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);
+2 -4
View File
@@ -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
+1 -1
View File
@@ -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);