diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-01-27 07:29:11 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-01-27 07:29:11 +0100 |
commit | 445d72abf487dc325ccbde1e3a12d1c4cf695a6a (patch) | |
tree | aee5cd0e2637625b25ad679f05edaf388368da55 /code/fe310/eos/eve.h | |
parent | 2d9f22e056b61917979db67da49fc0655b0af3a4 (diff) |
added screen tracking feature
Diffstat (limited to 'code/fe310/eos/eve.h')
-rw-r--r-- | code/fe310/eos/eve.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/code/fe310/eos/eve.h b/code/fe310/eos/eve.h index dc22f80..3e76b92 100644 --- a/code/fe310/eos/eve.h +++ b/code/fe310/eos/eve.h @@ -2,18 +2,26 @@ #include "eve_def.h" -#define EOS_TOUCH_ETYPE_DOWN 0x01 -#define EOS_TOUCH_ETYPE_UP 0x02 -#define EOS_TOUCH_ETYPE_DRAG 0x04 -#define EOS_TOUCH_ETYPE_TRACK 0x08 +#define EOS_TOUCH_ETYPE_TRACK 0x01 +#define EOS_TOUCH_ETYPE_TRACK_REG 0x02 +#define EOS_TOUCH_ETYPE_POINT_UP 0x10 +#define EOS_TOUCH_ETYPE_POINT_DOWN 0x20 +#define EOS_TOUCH_ETYPE_TAG_UP 0x40 +#define EOS_TOUCH_ETYPE_TAG_DOWN 0x80 + +#define EOS_TOUCH_ETYPE_TRACK_MASK 0x03 +#define EOS_TOUCH_ETYPE_POINT_MASK 0x30 +#define EOS_TOUCH_ETYPE_TAG_MASK 0xc0 typedef struct EOSTouch { uint16_t x; uint16_t y; - uint8_t tag; - uint8_t tag_prev; + uint16_t x0; + uint16_t y0; + uint8_t tag0; + uint8_t tag_up; + uint8_t tag_down; uint8_t evt; - char t; struct { uint16_t tag; uint16_t val; @@ -50,4 +58,4 @@ void eos_eve_cmd_burst_end(void); int eos_eve_init(void); void eos_eve_set_renderer(eos_eve_fptr_t renderer, uint8_t flags); EOSTouch *eos_touch_evt(uint8_t tag0, int touch_idx, uint8_t tag_min, uint8_t tag_max, uint8_t *evt); -void eos_touch_set_evt(uint8_t tag, uint8_t evt); +void eos_touch_evt_set(uint8_t tag, uint8_t evt); |