mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
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:
+3
-1
@@ -793,7 +793,9 @@ defconfig -- This is a configuration file similar to the Linux
|
|||||||
CONFIG_STMPE11_MULTIPLE
|
CONFIG_STMPE11_MULTIPLE
|
||||||
Can be defined to support multiple STMPE11 devices on board.
|
Can be defined to support multiple STMPE11 devices on board.
|
||||||
CONFIG_STMPE11_ACTIVELOW
|
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
|
CONFIG_STMPE11_NPOLLWAITERS
|
||||||
Maximum number of threads that can be waiting on poll() (ignored if
|
Maximum number of threads that can be waiting on poll() (ignored if
|
||||||
CONFIG_DISABLE_POLL is set).
|
CONFIG_DISABLE_POLL is set).
|
||||||
|
|||||||
@@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
|
|||||||
# CONFIG_STMPE11_MULTIPLE
|
# CONFIG_STMPE11_MULTIPLE
|
||||||
# Can be defined to support multiple STMPE11 devices on board.
|
# Can be defined to support multiple STMPE11 devices on board.
|
||||||
# CONFIG_STMPE11_ACTIVELOW
|
# 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
|
# CONFIG_STMPE11_NPOLLWAITERS
|
||||||
# Maximum number of threads that can be waiting on poll() (ignored if
|
# Maximum number of threads that can be waiting on poll() (ignored if
|
||||||
# CONFIG_DISABLE_POLL is set).
|
# CONFIG_DISABLE_POLL is set).
|
||||||
@@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
|
|||||||
CONFIG_STMPE11_I2C=y
|
CONFIG_STMPE11_I2C=y
|
||||||
CONFIG_STMPE11_MULTIPLE=y
|
CONFIG_STMPE11_MULTIPLE=y
|
||||||
CONFIG_STMPE11_ACTIVELOW=y
|
CONFIG_STMPE11_ACTIVELOW=y
|
||||||
|
CONFIG_STMPE11_EDGE=y
|
||||||
#CONFIG_STMPE11_NPOLLWAITERS
|
#CONFIG_STMPE11_NPOLLWAITERS
|
||||||
CONFIG_STMPE11_TSC_DISABLE=n
|
CONFIG_STMPE11_TSC_DISABLE=n
|
||||||
CONFIG_STMPE11_ADC_DISABLE=y
|
CONFIG_STMPE11_ADC_DISABLE=y
|
||||||
|
|||||||
@@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
|
|||||||
# CONFIG_STMPE11_MULTIPLE
|
# CONFIG_STMPE11_MULTIPLE
|
||||||
# Can be defined to support multiple STMPE11 devices on board.
|
# Can be defined to support multiple STMPE11 devices on board.
|
||||||
# CONFIG_STMPE11_ACTIVELOW
|
# 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
|
# CONFIG_STMPE11_NPOLLWAITERS
|
||||||
# Maximum number of threads that can be waiting on poll() (ignored if
|
# Maximum number of threads that can be waiting on poll() (ignored if
|
||||||
# CONFIG_DISABLE_POLL is set).
|
# CONFIG_DISABLE_POLL is set).
|
||||||
@@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
|
|||||||
CONFIG_STMPE11_I2C=y
|
CONFIG_STMPE11_I2C=y
|
||||||
CONFIG_STMPE11_MULTIPLE=y
|
CONFIG_STMPE11_MULTIPLE=y
|
||||||
CONFIG_STMPE11_ACTIVELOW=y
|
CONFIG_STMPE11_ACTIVELOW=y
|
||||||
|
CONFIG_STMPE11_EDGE=y
|
||||||
#CONFIG_STMPE11_NPOLLWAITERS
|
#CONFIG_STMPE11_NPOLLWAITERS
|
||||||
CONFIG_STMPE11_TSC_DISABLE=n
|
CONFIG_STMPE11_TSC_DISABLE=n
|
||||||
CONFIG_STMPE11_ADC_DISABLE=y
|
CONFIG_STMPE11_ADC_DISABLE=y
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
#include <nuttx/input/touchscreen.h>
|
#include <nuttx/input/touchscreen.h>
|
||||||
#include <nuttx/input/stmpe11.h>
|
#include <nuttx/input/stmpe11.h>
|
||||||
|
|
||||||
|
#include <arch/irq.h>
|
||||||
|
|
||||||
#include "stm32_internal.h"
|
#include "stm32_internal.h"
|
||||||
#include "stm3240g-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)
|
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable)
|
||||||
{
|
{
|
||||||
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state;
|
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)
|
if (enable)
|
||||||
{
|
{
|
||||||
/* Configure the EXTI interrupt using the SAVED handler */
|
/* 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);
|
(void)stm32_gpiosetevent(GPIO_IO_EXPANDER, false, false, false, NULL);
|
||||||
}
|
}
|
||||||
|
irqrestore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stmpe11_clear(FAR struct stmpe11_config_s *state)
|
static void stmpe11_clear(FAR struct stmpe11_config_s *state)
|
||||||
|
|||||||
Reference in New Issue
Block a user