From 77fac8557262940319c3fa3bc473866d4bb90450 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 Oct 2011 22:37:24 +0000 Subject: SAM3U SPI debug changes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4031 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/drivers/input/ads7843e.c | 12 ------------ nuttx/drivers/input/ads7843e.h | 6 ++---- nuttx/drivers/input/tsc2007.c | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) (limited to 'nuttx/drivers') 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 + * Author: Gregory Nutt * * 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); -- cgit v1.2.3