diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-03-23 21:33:57 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-03-23 21:33:57 +0100 |
commit | 8c61343677d2ed8f929372863016524707b8ab93 (patch) | |
tree | 59f2c65f006bcf20c0b9a6a73c53a100d08775a2 /fw/fe310/eos/eve/eve_kbd.c | |
parent | 98941cdc89d93f5387bb98a443f06408321acc8f (diff) |
form scroll completed
Diffstat (limited to 'fw/fe310/eos/eve/eve_kbd.c')
-rw-r--r-- | fw/fe310/eos/eve/eve_kbd.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fw/fe310/eos/eve/eve_kbd.c b/fw/fe310/eos/eve/eve_kbd.c index 5dd4d5a..a664ef2 100644 --- a/fw/fe310/eos/eve/eve_kbd.c +++ b/fw/fe310/eos/eve/eve_kbd.c @@ -73,17 +73,15 @@ void eve_kbd_set_handler(EVEKbd *kbd, eve_kbd_input_handler_t putc, void *param) kbd->param = param; } -int eve_kbd_touch(EVEKbd *kbd, uint8_t tag0, int touch_idx) { - EVETouch *t; - uint16_t evt; +int eve_kbd_touch(EVEKbd *kbd, EVETouch *touch, uint16_t evt, uint8_t tag0) { int ret; - t = eve_touch_evt(tag0, touch_idx, 1, 126, &evt); - if (t && evt) { - ret = 1; + evt = eve_touch_evt(touch, evt, tag0, 1, 126); + if (touch && evt) { + int8_t touch_idx = eve_touch_get_idx(touch); if (evt & EVE_TOUCH_ETYPE_TAG) { - uint8_t _tag = t->tag; + uint8_t _tag = touch->tag; if (_tag >= TAG_SHIFT && _tag <= TAG_FN) { if (touch_idx == 0) { @@ -113,7 +111,7 @@ int eve_kbd_touch(EVEKbd *kbd, uint8_t tag0, int touch_idx) { } } if (evt & EVE_TOUCH_ETYPE_TAG_UP) { - uint8_t _tag = t->tag_up; + uint8_t _tag = touch->tag_up; if (_tag >= TAG_SHIFT && _tag <= TAG_FN) { if (touch_idx == 0) { @@ -132,6 +130,7 @@ int eve_kbd_touch(EVEKbd *kbd, uint8_t tag0, int touch_idx) { } } } + ret = 1; } else { ret = 0; } |