SMTPE11 and NxWM touchscreen fixes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4722 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-05-11 18:27:46 +00:00
parent 940b9fedf1
commit 20ef82d544
4 changed files with 20 additions and 5 deletions

View File

@ -793,7 +793,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_STMPE11_MULTIPLE
Can be defined to support multiple STMPE11 devices on board.
CONFIG_STMPE11_ACTIVELOW
Interrupt is generated by an active low signal.
Interrupt is generated by an active low signal (or falling edge).
CONFIG_STMPE11_EDGE
Interrupt is generated on an edge (vs. on the active level)
CONFIG_STMPE11_NPOLLWAITERS
Maximum number of threads that can be waiting on poll() (ignored if
CONFIG_DISABLE_POLL is set).

View File

@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
# CONFIG_STMPE11_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board.
# CONFIG_STMPE11_ACTIVELOW
# Interrupt is generated by an active low signal.
# Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE
# Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set).
@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
CONFIG_STMPE11_I2C=y
CONFIG_STMPE11_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y

View File

@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
# CONFIG_STMPE11_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board.
# CONFIG_STMPE11_ACTIVELOW
# Interrupt is generated by an active low signal.
# Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE
# Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set).
@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
CONFIG_STMPE11_I2C=y
CONFIG_STMPE11_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y

View File

@ -49,6 +49,8 @@
#include <nuttx/input/touchscreen.h>
#include <nuttx/input/stmpe11.h>
#include <arch/irq.h>
#include "stm32_internal.h"
#include "stm3240g-internal.h"
@ -221,10 +223,14 @@ static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr)
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable)
{
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state;
irqstate_t flags;
/* Attach and enable, or detach and disable */
/* Attach and enable, or detach and disable. Enabling and disabling GPIO
* interrupts is a multi-step process so the safest thing is to keep
* interrupts disabled during the reconfiguratino.
*/
ivdbg("IRQ:%d enable:%d\n", STM32_IRQ_EXTI2, enable);
flags = irqsave();
if (enable)
{
/* Configure the EXTI interrupt using the SAVED handler */
@ -237,6 +243,7 @@ static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable)
(void)stm32_gpiosetevent(GPIO_IO_EXPANDER, false, false, false, NULL);
}
irqrestore(flags);
}
static void stmpe11_clear(FAR struct stmpe11_config_s *state)