summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/eve_touch.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/fe310/eos/eve/eve_touch.h')
-rw-r--r--code/fe310/eos/eve/eve_touch.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/code/fe310/eos/eve/eve_touch.h b/code/fe310/eos/eve/eve_touch.h
index 1d9d751..9f935bc 100644
--- a/code/fe310/eos/eve/eve_touch.h
+++ b/code/fe310/eos/eve/eve_touch.h
@@ -13,23 +13,24 @@
#define EVE_TOUCH_ETYPE_TAP1 0x0200
#define EVE_TOUCH_ETYPE_TAP2 0x0400
-#define EVE_TOUCH_EVT_MASK 0x0fff
-
-#define EVE_TOUCH_ETYPE_TAG_MASK (EVE_TOUCH_ETYPE_TAG | EVE_TOUCH_ETYPE_TAG_UP)
-#define EVE_TOUCH_ETYPE_TAP_MASK (EVE_TOUCH_ETYPE_TAP1 | EVE_TOUCH_ETYPE_TAP2)
-#define EVE_TOUCH_ETYPE_TRACK_MASK (EVE_TOUCH_ETYPE_TRACK | EVE_TOUCH_ETYPE_TRACK_START | EVE_TOUCH_ETYPE_TRACK_STOP)
-#define EVE_TOUCH_ETYPE_POINT_MASK (EVE_TOUCH_ETYPE_POINT | EVE_TOUCH_ETYPE_POINT_UP)
-#define EVE_TOUCH_ETYPE_TIMER_MASK (EVE_TOUCH_OPT_LPRESS | EVE_TOUCH_OPT_DTAP)
+#define EVE_TOUCH_ETYPE_TAG_MASK (EVE_TOUCH_ETYPE_TAG | EVE_TOUCH_ETYPE_TAG_UP)
+#define EVE_TOUCH_ETYPE_TAP_MASK (EVE_TOUCH_ETYPE_TAP1 | EVE_TOUCH_ETYPE_TAP2)
+#define EVE_TOUCH_ETYPE_TRACK_MASK (EVE_TOUCH_ETYPE_TRACK | EVE_TOUCH_ETYPE_TRACK_START | EVE_TOUCH_ETYPE_TRACK_STOP)
+#define EVE_TOUCH_ETYPE_POINT_MASK (EVE_TOUCH_ETYPE_POINT | EVE_TOUCH_ETYPE_POINT_UP)
+#define EVE_TOUCH_ETYPE_TIMER_MASK (EVE_TOUCH_OPT_LPRESS | EVE_TOUCH_OPT_DTAP)
/* extended events */
-#define EVE_TOUCH_ETYPE_TRACK_LEFT 0x1000
-#define EVE_TOUCH_ETYPE_TRACK_RIGHT 0x2000
-#define EVE_TOUCH_ETYPE_TRACK_UP 0x4000
-#define EVE_TOUCH_ETYPE_TRACK_DOWN 0x8000
+#define EVE_TOUCH_EETYPE_LPRESS 0x0001
+#define EVE_TOUCH_EETYPE_TAP2 0x0002
+
+#define EVE_TOUCH_EETYPE_TRACK_LEFT 0x1000
+#define EVE_TOUCH_EETYPE_TRACK_RIGHT 0x2000
+#define EVE_TOUCH_EETYPE_TRACK_UP 0x4000
+#define EVE_TOUCH_EETYPE_TRACK_DOWN 0x8000
-#define EVE_TOUCH_ETYPE_TRACK_X (EVE_TOUCH_ETYPE_TRACK_LEFT | EVE_TOUCH_ETYPE_TRACK_RIGHT)
-#define EVE_TOUCH_ETYPE_TRACK_Y (EVE_TOUCH_ETYPE_TRACK_UP | EVE_TOUCH_ETYPE_TRACK_DOWN)
-#define EVE_TOUCH_ETYPE_TRACK_XY (EVE_TOUCH_ETYPE_TRACK_X | EVE_TOUCH_ETYPE_TRACK_Y)
+#define EVE_TOUCH_EETYPE_TRACK_X (EVE_TOUCH_EETYPE_TRACK_LEFT | EVE_TOUCH_EETYPE_TRACK_RIGHT)
+#define EVE_TOUCH_EETYPE_TRACK_Y (EVE_TOUCH_EETYPE_TRACK_UP | EVE_TOUCH_EETYPE_TRACK_DOWN)
+#define EVE_TOUCH_EETYPE_TRACK_XY (EVE_TOUCH_EETYPE_TRACK_X | EVE_TOUCH_EETYPE_TRACK_Y)
/* tag options */
#define EVE_TOUCH_OPT_TRACK EVE_TOUCH_ETYPE_TRACK
@@ -40,9 +41,9 @@
#define EVE_TOUCH_OPT_LPRESS 0x40
#define EVE_TOUCH_OPT_DTAP 0x80
-#define EVE_TOUCH_OPT_TRACK_XY (EVE_TOUCH_OPT_TRACK_X | EVE_TOUCH_OPT_TRACK_Y)
-#define EVE_TOUCH_OPT_TRACK_MASK (EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_REG)
-#define EVE_TOUCH_OPT_TIMER_MASK (EVE_TOUCH_OPT_LPRESS | EVE_TOUCH_OPT_DTAP)
+#define EVE_TOUCH_OPT_TRACK_XY (EVE_TOUCH_OPT_TRACK_X | EVE_TOUCH_OPT_TRACK_Y)
+#define EVE_TOUCH_OPT_TRACK_MASK (EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_REG)
+#define EVE_TOUCH_OPT_TIMER_MASK (EVE_TOUCH_OPT_LPRESS | EVE_TOUCH_OPT_DTAP)
typedef void (*eve_touch_handler_t) (void *, uint8_t, int);
@@ -55,6 +56,7 @@ typedef struct EVETouch {
int y0;
uint64_t t;
uint16_t evt;
+ uint16_t eevt;
uint8_t tag0;
uint8_t tag;
uint8_t tag_up;