SAM3U-EK: Correct polarity of the PENIRQ signal
This commit is contained in:
parent
28a7c22757
commit
5ed3283b02
@ -581,6 +581,7 @@ Configuration sub-directories
|
||||
CONFIG_INPUT_ADS7843E=y : Enable support for the XPT2048
|
||||
CONFIG_ADS7843E_SPIDEV=2 : Use SPI CS 2 for communication
|
||||
CONFIG_ADS7843E_SPIMODE=0 : Use SPI mode 0
|
||||
CONFIG_ADS7843E_FREQUENCY=1000000 : SPI BAUD 1MHz
|
||||
CONFIG_ADS7843E_THRESHX=39 : These will probably need to be tuned
|
||||
CONFIG_ADS7843E_THRESHY=51
|
||||
|
||||
@ -609,14 +610,11 @@ Configuration sub-directories
|
||||
CONFIG_DEBUG_INPUT=y : Enable debug output from input devices
|
||||
|
||||
STATUS:
|
||||
2013-6-14: The touchscreen is not functional. BUSY is initially
|
||||
'0' when asserted says '1'. The pend down GPIO inputis always
|
||||
'1' and there seems to be many spurious interrupts (but not so
|
||||
many as to lock up the system).
|
||||
|
||||
So there are GIO issues, but on the positive side, the driver
|
||||
does appear to produce good touch data when touched but a lot
|
||||
of clean-up is needed.
|
||||
2013-6-16: The touchscreen is not functional. It seems to
|
||||
perform good measurements but I am not getting the /PENIRQ
|
||||
interrupt. The interrupt is set up correctly (I can ground
|
||||
A24 and I get the interrupt), so apparently the ADS7843E is
|
||||
not generating interrupts.
|
||||
|
||||
nx:
|
||||
Configures to use examples/nx using the HX834x LCD hardware on
|
||||
|
@ -143,14 +143,19 @@
|
||||
*
|
||||
* The IRQ is active low and pulled up.
|
||||
*
|
||||
* Pen Interrupt. Open anode output, requires 10kO to 100kO pull-up resistor
|
||||
* externally. There is a 100KO pull-up on the SAM3U-EK board so no additional
|
||||
* pull-up should be required.
|
||||
*
|
||||
* BUSY is high impedance when CS is high (not selected). When CS is
|
||||
* is low, BUSY is active high. Since the pin is pulled up, it will appear
|
||||
* busy if CS is not selected.
|
||||
* busy if CS is not selected (there is no pull-up onboard).
|
||||
*/
|
||||
|
||||
#define GPIO_TCS_IRQ (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_INT_BOTHEDGES | \
|
||||
GPIO_PORT_PIOA | GPIO_PIN24)
|
||||
#define GPIO_TCS_BUSY (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_PORT_PIOA | GPIO_PIN2)
|
||||
#define GPIO_TCS_BUSY (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_PORT_PIOA | \
|
||||
GPIO_PIN2)
|
||||
|
||||
#define SAM_TCS_IRQ SAM_IRQ_PA24
|
||||
|
||||
@ -165,10 +170,10 @@
|
||||
|
||||
/* BUTTONS */
|
||||
|
||||
#define GPIO_BUTTON1 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | GPIO_INT_BOTHEDGES | \
|
||||
GPIO_PORT_PIOA | GPIO_PIN18)
|
||||
#define GPIO_BUTTON2 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | GPIO_INT_BOTHEDGES | \
|
||||
GPIO_PORT_PIOA | GPIO_PIN19)
|
||||
#define GPIO_BUTTON1 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | \
|
||||
GPIO_INT_BOTHEDGES | GPIO_PORT_PIOA | GPIO_PIN18)
|
||||
#define GPIO_BUTTON2 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | \
|
||||
GPIO_INT_BOTHEDGES | GPIO_PORT_PIOA | GPIO_PIN19)
|
||||
|
||||
#define IRQ_BUTTON1 SAM_IRQ_PA18
|
||||
#define IRQ_BUTTON2 SAM_IRQ_PA19
|
||||
|
@ -201,9 +201,9 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state)
|
||||
|
||||
static bool tsc_pendown(FAR struct ads7843e_config_s *state)
|
||||
{
|
||||
/* REVISIT: This might need to be inverted */
|
||||
/* The /PENIRQ value is active low */
|
||||
|
||||
bool pendown = sam_gpioread(GPIO_TCS_IRQ);
|
||||
bool pendown = !sam_gpioread(GPIO_TCS_IRQ);
|
||||
ivdbg("pendown:%d\n", pendown);
|
||||
return pendown;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user