diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-07-03 09:07:01 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-07-03 09:07:01 -0600 |
commit | 9428730e257e71d450c32e74fb1759ebba4d4041 (patch) | |
tree | b005990bac0889009b85e3e2db5a3a625cc26192 | |
parent | eaa7f1a2b126033142b38e446c8f48e805390dcb (diff) | |
download | nuttx-9428730e257e71d450c32e74fb1759ebba4d4041.tar.gz nuttx-9428730e257e71d450c32e74fb1759ebba4d4041.tar.bz2 nuttx-9428730e257e71d450c32e74fb1759ebba4d4041.zip |
Back out part of last change to the Arduino Due touchscreen driver
-rw-r--r-- | nuttx/configs/arduino-due/src/sam_touchscreen.c | 10 | ||||
-rwxr-xr-x | nuttx/include/nuttx/spi/spi_bitbang.c | 26 |
2 files changed, 16 insertions, 20 deletions
diff --git a/nuttx/configs/arduino-due/src/sam_touchscreen.c b/nuttx/configs/arduino-due/src/sam_touchscreen.c index e3e4ee3ed..272a21976 100644 --- a/nuttx/configs/arduino-due/src/sam_touchscreen.c +++ b/nuttx/configs/arduino-due/src/sam_touchscreen.c @@ -416,19 +416,15 @@ int arch_tcinitialize(int minor) * None * * Returned Value: - * None. + * None * ****************************************************************************/ void arch_tcuninitialize(void) { - /* No real support for un-initializing the touchscreen XPT2046 device. - * Just make sure that interrupts are disabled and that no handler is - * attached. + /* No support for un-initializing the touchscreen XPT2046 device. It will + * continue to run and process touch interrupts in the background. */ - - sam_gpioirqdisable(SAM_TSC_IRQ); - irq_detach(SAM_TSC_IRQ); } #endif /* CONFIG_ARDUINO_ITHEAD_TFT && CONFIG_SPI_BITBANG && CONFIG_INPUT_ADS7843E */ diff --git a/nuttx/include/nuttx/spi/spi_bitbang.c b/nuttx/include/nuttx/spi/spi_bitbang.c index d2cc22a5e..73b36c0ce 100755 --- a/nuttx/include/nuttx/spi/spi_bitbang.c +++ b/nuttx/include/nuttx/spi/spi_bitbang.c @@ -352,14 +352,14 @@ static void spi_setmode(FAR struct spi_bitbang_s *priv, static uint16_t spi_bitexchange0(uint16_t dataout, uint32_t holdtime) { uint16_t datain; - /* No clock transition before setting MOSI */ + /* No clock transition before setting MOSI */ if (dataout != 0) { - SPI_SETMOSI; /* Set MISO if the bit is set */ + SPI_SETMOSI; /* Set MOSI if the bit is set */ } else { - SPI_CLRMOSI; /* Clear MISO if the bit is not set */ + SPI_CLRMOSI; /* Clear MOSI if the bit is not set */ } SPI_SETSCK; /* Clock transition before getting MISO */ @@ -369,7 +369,7 @@ static uint16_t spi_bitexchange0(uint16_t dataout, uint32_t holdtime) spi_delay(holdtime); } - SPI_CLRSCK; /* Return clock to the resting state after getting MISO */ + SPI_CLRSCK; /* Return clock to the resting state */ if (holdtime > 0) { spi_delay(holdtime); @@ -415,11 +415,11 @@ static uint16_t spi_bitexchange1(uint16_t dataout, uint32_t holdtime) SPI_SETSCK; /* Clock transition before setting MOSI */ if (dataout != 0) { - SPI_SETMOSI; /* Set MISO if the bit is set */ + SPI_SETMOSI; /* Set MOSI if the bit is set */ } else { - SPI_CLRMOSI; /* Clear MISO if the bit is not set */ + SPI_CLRMOSI; /* Clear MOSI if the bit is not set */ } if (holdtime > 0) @@ -429,7 +429,7 @@ static uint16_t spi_bitexchange1(uint16_t dataout, uint32_t holdtime) SPI_CLRSCK; /* Clock transition before getting MISO */ datain = (uint16_t)SPI_GETMISO; /* Get bit 0 = MISO value */ - /* Clock is in resting state after getting MISO */ + /* Clock is in resting state */ if (holdtime > 0) { spi_delay(holdtime); @@ -474,11 +474,11 @@ static uint16_t spi_bitexchange2(uint16_t dataout, uint32_t holdtime) /* No clock transition before setting MOSI */ if (dataout != 0) { - SPI_SETMOSI; /* Set MISO if the bit is set */ + SPI_SETMOSI; /* Set MOSI if the bit is set */ } else { - SPI_CLRMOSI; /* Clear MISO if the bit is not set */ + SPI_CLRMOSI; /* Clear MOSI if the bit is not set */ } SPI_CLRSCK; /* Clock transition before getting MISO */ @@ -488,7 +488,7 @@ static uint16_t spi_bitexchange2(uint16_t dataout, uint32_t holdtime) spi_delay(holdtime); } - SPI_SETSCK; /* Return clock to the resting state after getting MISO */ + SPI_SETSCK; /* Return clock to the resting state */ if (holdtime > 0) { spi_delay(holdtime); @@ -534,11 +534,11 @@ static uint16_t spi_bitexchange3(uint16_t dataout, uint32_t holdtime) SPI_CLRSCK; /* Clock transition before setting MOSI */ if (dataout != 0) { - SPI_SETMOSI; /* Set MISO if the bit is set */ + SPI_SETMOSI; /* Set MOSI if the bit is set */ } else { - SPI_CLRMOSI; /* Clear MISO if the bit is not set */ + SPI_CLRMOSI; /* Clear MOSI if the bit is not set */ } if (holdtime > 0) @@ -548,7 +548,7 @@ static uint16_t spi_bitexchange3(uint16_t dataout, uint32_t holdtime) SPI_SETSCK; /* Clock transition before getting MISO */ datain = (uint16_t)SPI_GETMISO; /* Get bit 0 = MISO value */ - /* Clock is in resting state after getting MISO */ + /* Clock is in resting state */ if (holdtime > 0) { spi_delay(holdtime); |