summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/eve_touch.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-06-08 14:25:36 +0200
committerUros Majstorovic <majstor@majstor.org>2020-06-08 14:25:36 +0200
commit910c890ab07157cdf4710194d98a45a7fcf4cee3 (patch)
treeb3677f95f6a5cf1f61910e280b834b862abbc6c9 /code/fe310/eos/eve/eve_touch.h
parent4ed8eb19f573d15b1b0526b2588bf20758b4f374 (diff)
touch extended tracking refactor
Diffstat (limited to 'code/fe310/eos/eve/eve_touch.h')
-rw-r--r--code/fe310/eos/eve/eve_touch.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/code/fe310/eos/eve/eve_touch.h b/code/fe310/eos/eve/eve_touch.h
index 1382ddc..656dd2f 100644
--- a/code/fe310/eos/eve/eve_touch.h
+++ b/code/fe310/eos/eve/eve_touch.h
@@ -44,6 +44,8 @@
#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);
+
typedef struct EVETouch {
int x;
int y;
@@ -72,15 +74,27 @@ typedef struct EVETouchTimer {
void *p;
} EVETouchTimer;
-typedef void (*eve_touch_handler_t) (void *, uint8_t, int);
-
-void eve_init_touch(void);
void eve_handle_touch(void);
void eve_handle_time(void);
+void eve_touch_init(void);
void eve_touch_set_handler(eve_touch_handler_t handler, void *handler_param);
EVETouch *eve_touch_evt(uint8_t tag0, int touch_idx, uint8_t tag_min, uint8_t tag_max, uint16_t *evt);
void eve_touch_set_opt(uint8_t tag, uint8_t opt);
uint8_t eve_touch_get_opt(uint8_t tag);
void eve_touch_clear_opt(void);
EVETouchTimer *eve_touch_get_timer(void);
+
+typedef void (*eve_etrack_init_t) (EVETouchTimer *, EVETouch *);
+typedef int (*eve_etrack_tick_t) (EVETouchTimer *, EVETouch *);
+typedef void (*eve_etrack_stop_t) (EVETouchTimer *, EVETouch *);
+
+typedef struct EVEExtTracker {
+ eve_etrack_init_t init;
+ eve_etrack_tick_t tick;
+ eve_etrack_stop_t stop;
+} EVEExtTracker;
+
+void eve_etrack_set(eve_etrack_init_t init, eve_etrack_tick_t tick, eve_etrack_stop_t stop, void *param);
+void eve_etrack_start(int i);
+void eve_etrack_stop(void);