aboutsummaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-14 21:57:38 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-14 21:57:38 +0000
commit383e7a0c97e0e559da8eb2c2a128153ad068d67a (patch)
treeaed7b7c4f84c4b2016b606b390e818023d2c3841 /nuttx/include
parentdb2bfa3e69fee84003a2fe13632c21046a1dc5b4 (diff)
downloadpx4-firmware-383e7a0c97e0e559da8eb2c2a128153ad068d67a.tar.gz
px4-firmware-383e7a0c97e0e559da8eb2c2a128153ad068d67a.tar.bz2
px4-firmware-383e7a0c97e0e559da8eb2c2a128153ad068d67a.zip
Improved thresholding logic in the STMPE11 driver; NxWM: Oops minimizing wrong application
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4737 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/input/stmpe11.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/input/stmpe11.h b/nuttx/include/nuttx/input/stmpe11.h
index 5ecc53af1..2436437e6 100644
--- a/nuttx/include/nuttx/input/stmpe11.h
+++ b/nuttx/include/nuttx/input/stmpe11.h
@@ -86,6 +86,13 @@
* Disable driver temperature sensor functionality.
* CONFIG_STMPE11_REGDEBUG
* Enabled very low register-level debug output. Requires CONFIG_DEBUG.
+ * CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY
+ * STMPE11 touchscreen data comes in a a very high rate. New touch positions
+ * will only be reported when the X or Y data changes by these thresholds.
+ * This trades reduces data rate for some loss in dragging accuracy. The
+ * STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So
+ * for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
+ * would correspond to one pixel. Default: 12
*/
/* The STMPE811 interfaces with the target CPU via a I2C or SPI interface. The pin IN_1
@@ -127,6 +134,16 @@
# error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected."
#endif
+/* Thresholds */
+
+#ifndef CONFIG_STMPE11_THRESHX
+# define CONFIG_STMPE11_THRESHX 12
+#endif
+
+#ifndef CONFIG_STMPE11_THRESHY
+# define CONFIG_STMPE11_THRESHY 12
+#endif
+
/* Debug output */
#ifndef CONFIG_DEBUG