diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-04-07 15:16:29 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-04-07 15:16:29 -0600 |
commit | ae2b100e75622ea79da3cea10093609259debbb7 (patch) | |
tree | 638e20bb4613017b8ac9b91b212bf43cbf8bf273 /nuttx/configs/open1788/src | |
parent | 144f80ab044da641c8060c28fe5b4ea4c7e7fb07 (diff) | |
download | px4-nuttx-ae2b100e75622ea79da3cea10093609259debbb7.tar.gz px4-nuttx-ae2b100e75622ea79da3cea10093609259debbb7.tar.bz2 px4-nuttx-ae2b100e75622ea79da3cea10093609259debbb7.zip |
Back out part of the LPC17xx touchscreen GPIO interrupt logic; they are incorrect
Diffstat (limited to 'nuttx/configs/open1788/src')
-rw-r--r-- | nuttx/configs/open1788/src/lpc17_touchscreen.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/nuttx/configs/open1788/src/lpc17_touchscreen.c b/nuttx/configs/open1788/src/lpc17_touchscreen.c index 7bb872a20..98fd7eeee 100644 --- a/nuttx/configs/open1788/src/lpc17_touchscreen.c +++ b/nuttx/configs/open1788/src/lpc17_touchscreen.c @@ -178,21 +178,19 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) ivdbg("enable:%d\n", enable); if (enable) { - /* Configure the PENIRQ GPIO as an interrupting enable and enable the interrupt */ + /* Enable the pin interrupt. The pin interrupt is enabled from worker thread + * logic after completion of processing of the touchscreen interrupt. + */ - (void)lpc17_configgpio(GPIO_TC_PENIRQ); up_enable_irq(LPC17_IRQ_PENIRQ); } else { - /* Disable PENIRQ interrupts and reconfigure the pin as a normal input pin. - * We have to do this because the PENIRQ interrupt will be disabled from - * interrupt handling logic and, in that case, will be automatically re-enabled - * when the interrupt returns. + /* Disable PENIRQ interrupts. NOTE: The PENIRQ interrupt will be disabled from + * interrupt handling logic. */ up_disable_irq(LPC17_IRQ_PENIRQ); - (void)lpc17_configgpio(GPIO_TC_PEN); } } @@ -288,12 +286,9 @@ int arch_tcinitialize(int minor) if (!initialized) { - /* Configure and enable the XPT2046 PENIRQ pin as a normal input. It - * will be reconfigured as an interrupting input when tsc_enable is - * called to enable the PENIRQ interrupt. - */ + /* Configure and enable the XPT2046 PENIRQ pin as an interrupting input. */ - (void)lpc17_configgpio(GPIO_TC_PEN); + (void)lpc17_configgpio(GPIO_TC_PENIRQ); /* Configure the XPT2046 BUSY pin as a normal input. */ |