diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-02-10 10:14:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-02-10 10:14:22 -0600 |
commit | 105f5fbfcbbf411deefddac8039ccb3b03477609 (patch) | |
tree | 9391251ac4481cf2f8d6f066949920d439ad86cd /apps/examples/touchscreen/tc.h | |
parent | affcb091dfe86c33c3a4dca58005a1c0670dc8ce (diff) | |
download | nuttx-105f5fbfcbbf411deefddac8039ccb3b03477609.tar.gz nuttx-105f5fbfcbbf411deefddac8039ccb3b03477609.tar.bz2 nuttx-105f5fbfcbbf411deefddac8039ccb3b03477609.zip |
Add a mouse interface that is similar to the touchscreen interface except that it can handle multple buttons and continuously reports positional data so that it can control a cursor
Diffstat (limited to 'apps/examples/touchscreen/tc.h')
-rw-r--r-- | apps/examples/touchscreen/tc.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/examples/touchscreen/tc.h b/apps/examples/touchscreen/tc.h index 1757fe0c8..2a8dde203 100644 --- a/apps/examples/touchscreen/tc.h +++ b/apps/examples/touchscreen/tc.h @@ -59,6 +59,8 @@ * and this value is ignored. Otherwise, this number of samples is * collected and the program terminates. Default: Zero (Samples are collected * indefinitely). + * CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE - The touchscreen test can also be + * configured to work with a mouse driver by setting this option. */ #ifndef CONFIG_INPUT @@ -68,13 +70,21 @@ #ifndef CONFIG_EXAMPLES_TOUCHSCREEN_MINOR # undef CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH # define CONFIG_EXAMPLES_TOUCHSCREEN_MINOR 0 -# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/input0" +# ifdef CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE +# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/mouse0" +# else +# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/input0" +# endif #endif #ifndef CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH # undef CONFIG_EXAMPLES_TOUCHSCREEN_MINOR # define CONFIG_EXAMPLES_TOUCHSCREEN_MINOR 0 -# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/input0" +# ifdef CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE +# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/mouse0" +# else +# define CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH "/dev/input0" +# endif #endif #ifndef CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES |