Back out part of last change to the Arduino Due touchscreen driver

This commit is contained in:
Gregory Nutt 2013-07-03 09:07:01 -06:00
parent 94e2f4ceb4
commit ac36a07e24
2 changed files with 16 additions and 20 deletions

View File

@ -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 */

View File

@ -355,11 +355,11 @@ static uint16_t spi_bitexchange0(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_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);