aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ginput/touch
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2012-11-29 01:20:54 +0100
committerJoel Bodenmann <joel@unormal.org>2012-11-29 01:20:54 +0100
commit62dee0d3515a63a0fa25f4506dc765ecab29c1f5 (patch)
tree6a322c0a9f7d92e0e00e477cf830b016f33d7ed6 /drivers/ginput/touch
parentde85a1496e28bdbeb716c432161e7271ca3358ec (diff)
downloaduGFX-62dee0d3515a63a0fa25f4506dc765ecab29c1f5.tar.gz
uGFX-62dee0d3515a63a0fa25f4506dc765ecab29c1f5.tar.bz2
uGFX-62dee0d3515a63a0fa25f4506dc765ecab29c1f5.zip
porting of the touchscreen/MCU driver to ginput - not working yet
Diffstat (limited to 'drivers/ginput/touch')
-rw-r--r--drivers/ginput/touch/MCU/ginput_lld_mouse.c12
-rw-r--r--drivers/ginput/touch/MCU/ginput_lld_mouse_config.h8
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/ginput/touch/MCU/ginput_lld_mouse.c b/drivers/ginput/touch/MCU/ginput_lld_mouse.c
index b3405989..d0a3c42e 100644
--- a/drivers/ginput/touch/MCU/ginput_lld_mouse.c
+++ b/drivers/ginput/touch/MCU/ginput_lld_mouse.c
@@ -31,13 +31,15 @@
#if (GFX_USE_GINPUT && GINPUT_NEED_MOUSE) /*|| defined(__DOXYGEN__)*/
-#include "lld/ginput/touch.h"
+#include "gdisp.h" /* for coord_t */
+#include "gevent.h"
+#include "ginput/ginput_mouse.h" /* for GINPUT_TOUCH_PRESSED */
+#include "lld/ginput/mouse.h"
#if defined(GINPUT_MOUSE_USE_CUSTOM_BOARD) && GINPUT_MOUSE_USE_CUSTOM_BOARD
- /* Include the user supplied board definitions */
#include "ginput_lld_mouse_board.h"
-//#elif defined(BOARD_OLIMEX_SAM7_EX256)
-// #include "ginput_lld_mouse_board_olimexsam7ex256.h"
+#elif defined(BOARD_OLIMEX_STM32_LCD)
+ #include "ginput_lld_mouse_board_olimex_stm32_lcd.h"
#else
#include "ginput_lld_mouse_board.h"
#endif
@@ -92,6 +94,8 @@ void ginput_lld_mouse_init(void) {
* @notapi
*/
void ginput_lld_mouse_get_reading(MouseReading *pt) {
+ uint16_t i;
+
// If touch-off return the previous results
if (!getpin_pressed()) {
pt->x = lastx;
diff --git a/drivers/ginput/touch/MCU/ginput_lld_mouse_config.h b/drivers/ginput/touch/MCU/ginput_lld_mouse_config.h
index d56be229..e1aa15f3 100644
--- a/drivers/ginput/touch/MCU/ginput_lld_mouse_config.h
+++ b/drivers/ginput/touch/MCU/ginput_lld_mouse_config.h
@@ -28,13 +28,13 @@
#define _LLD_GINPUT_MOUSE_CONFIG_H
#define GINPUT_MOUSE_EVENT_TYPE GEVENT_TOUCH
-#define GINPUT_MOUSE_NEED_CALIBRATION TRUE
+#define GINPUT_MOUSE_NEED_CALIBRATION FALSE
#define GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE FALSE
-#define GINPUT_MOUSE_MAX_CALIBRATION_ERROR 2
+#define GINPUT_MOUSE_MAX_CALIBRATION_ERROR -1
#define GINPUT_MOUSE_READ_CYCLES 4
#define GINPUT_MOUSE_POLL_PERIOD 100
-#define GINPUT_MOUSE_MAX_CLICK_JITTER 2
-#define GINPUT_MOUSE_MAX_MOVE_JITTER 2
+#define GINPUT_MOUSE_MAX_CLICK_JITTER 4
+#define GINPUT_MOUSE_MAX_MOVE_JITTER 4
#define GINPUT_MOUSE_CLICK_TIME 700
#endif /* _LLD_GINPUT_MOUSE_CONFIG_H */