Fixes mostly related to touchscreen on Shenzhou board (still does not work)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5196 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
99e8898f04
commit
0d4e24d60d
@ -696,3 +696,61 @@ Where <subdir> is one of the following:
|
||||
delay (maybe 30 seconds?) before anything happens. That is the timeout
|
||||
before the networking finally gives up and decides that no network is
|
||||
available.
|
||||
|
||||
nxwm
|
||||
----
|
||||
This is a special configuration setup for the NxWM window manager
|
||||
UnitTest. The NxWM window manager can be found here:
|
||||
|
||||
trunk/NxWidgets/nxwm
|
||||
|
||||
The NxWM unit test can be found at:
|
||||
|
||||
trunk/NxWidgets/UnitTests/nxwm
|
||||
|
||||
NOTE: JP6 selects between the touchscreen interrupt and the MII
|
||||
interrupt. It should be positioned 1-2 to enable the touchscreen
|
||||
interrupt.
|
||||
|
||||
Documentation for installing the NxWM unit test can be found here:
|
||||
|
||||
trunk/NxWidgets/UnitTests/README.txt
|
||||
|
||||
Here is the quick summary of the build steps:
|
||||
|
||||
1. Intall the nxwm configuration
|
||||
|
||||
$ cd ~/nuttx/trunk/nuttx/tools
|
||||
$ ./configure.sh shenzhou/nxwm
|
||||
|
||||
2. Make the build context (only)
|
||||
|
||||
$ cd ..
|
||||
$ . ./setenv.sh
|
||||
$ make context
|
||||
...
|
||||
|
||||
3. Install the nxwm unit test
|
||||
|
||||
$ cd ~/nuttx/trunk/NxWidgets
|
||||
$ tools/install.sh ~/nuttx/trunk/apps nxwm
|
||||
Creating symbolic link
|
||||
- To ~/nuttx/trunk/NxWidgets/UnitTests/nxwm
|
||||
- At ~/nuttx/trunk/apps/external
|
||||
|
||||
4. Build the NxWidgets library
|
||||
|
||||
$ cd ~/nuttx/trunk/NxWidgets/libnxwidgets
|
||||
$ make TOPDIR=~/nuttx/trunk/nuttx
|
||||
...
|
||||
|
||||
5. Build the NxWM library
|
||||
|
||||
$ cd ~/nuttx/trunk/NxWidgets/nxwm
|
||||
$ make TOPDIR=~//nuttx/trunk/nuttx
|
||||
...
|
||||
|
||||
6. Built NuttX with the installed unit test as the application
|
||||
|
||||
$ cd ~/nuttx/trunk/nuttx
|
||||
$ make
|
||||
|
@ -173,19 +173,23 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
|
||||
{
|
||||
FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state;
|
||||
|
||||
DEBUGASSERT(priv->handler);
|
||||
/* The caller should not attempt to enable interrupts if the handler
|
||||
* has not yet been 'attached'
|
||||
*/
|
||||
|
||||
DEBUGASSERT(priv->handler || !enable);
|
||||
|
||||
/* Attach and enable, or detach and disable */
|
||||
|
||||
ivdbg("enable:%d\n", enable);
|
||||
if (enable)
|
||||
{
|
||||
(void)stm32_gpiosetevent(GPIO_TP_INT, false, true, true,
|
||||
(void)stm32_gpiosetevent(GPIO_TP_INT, true, true, false,
|
||||
priv->handler);
|
||||
}
|
||||
else
|
||||
{
|
||||
(void)stm32_gpiosetevent(GPIO_TP_INT, false, true, true, NULL);
|
||||
(void)stm32_gpiosetevent(GPIO_TP_INT, false, false, false, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,9 +209,12 @@ 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 */
|
||||
/* XPT2046 uses an an internal pullup resistor. The PENIRQ output goes low
|
||||
* due to the current path through the touch screen to ground, which
|
||||
* initiates an interrupt to the processor via TP_INT.
|
||||
*/
|
||||
|
||||
bool pendown = stm32_gpioread(GPIO_TP_INT);
|
||||
bool pendown = !stm32_gpioread(GPIO_TP_INT);
|
||||
ivdbg("pendown:%d\n", pendown);
|
||||
return pendown;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user