diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-28 18:38:37 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-28 18:38:37 +0100 |
commit | 6a4c8a1f11f6a7bd57b0fd618f455bcdecbfe538 (patch) | |
tree | 6d16dbc38b3bac0e91d39f3e86bb6810761ddb84 /fw/fe310/eos/eve/eve_touch.c | |
parent | 468e81e6da66f6dfec3a4857dc6e2f370ab180f1 (diff) |
net send will do selected spi dev pause/resume if more is set and netowk is not active
Diffstat (limited to 'fw/fe310/eos/eve/eve_touch.c')
-rw-r--r-- | fw/fe310/eos/eve/eve_touch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fw/fe310/eos/eve/eve_touch.c b/fw/fe310/eos/eve/eve_touch.c index e3dae58..fff1eec 100644 --- a/fw/fe310/eos/eve/eve_touch.c +++ b/fw/fe310/eos/eve/eve_touch.c @@ -69,8 +69,11 @@ void eve_handle_touch(void) { char int_ccomplete = 0; uint8_t tag0 = _tag0; uint8_t touch_last = 0; - uint8_t flags = eve_read8(REG_INT_FLAGS) & _intr_mask; + uint8_t flags; + eve_spi_start(); + + flags = eve_read8(REG_INT_FLAGS) & _intr_mask; if (!_multitouch && (flags & EVE_INT_TOUCH)) _multitouch = 1; for (i=0; i<EVE_MAX_TOUCH; i++) { uint8_t touch_tag; @@ -261,9 +264,13 @@ void eve_handle_touch(void) { _touch_handler(_touch_handler_param, tag0, i); } } + + eve_spi_stop(); } void eve_handle_time(void) { + eve_spi_start(); + if (_touch_handler && _touch_timer.tag) { EVETouch *touch = &_touch[_touch_timer.idx]; @@ -296,6 +303,8 @@ void eve_handle_time(void) { _touch_timer_clear(); } } + + eve_spi_stop(); } void eve_touch_init(void) { |