diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-11-18 03:18:18 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-11-18 03:18:18 +0100 |
commit | c44897fda572cf8837b4535a6d1aaad4605c14af (patch) | |
tree | c3c98c36589253da3a1a6308ec2804b5eb4a4d75 /fw/fe310/eos/eve/eve_touch.c | |
parent | b0e84c72d7a533f62ca750a73445da7fcebe8d18 (diff) |
eve sleep improved
Diffstat (limited to 'fw/fe310/eos/eve/eve_touch.c')
-rw-r--r-- | fw/fe310/eos/eve/eve_touch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fw/fe310/eos/eve/eve_touch.c b/fw/fe310/eos/eve/eve_touch.c index 77a0bf9..035e122 100644 --- a/fw/fe310/eos/eve/eve_touch.c +++ b/fw/fe310/eos/eve/eve_touch.c @@ -300,11 +300,18 @@ void eve_handle_time(void) { } } +void eve_touch_active(void) { + eve_write8(REG_TOUCH_MODE, EVE_TMODE_CONTINUOUS); +} + +void eve_touch_sleep(void) { + eve_write8(REG_TOUCH_MODE, EVE_TMODE_OFF); +} + static void _init(int touch_calibrate, uint32_t *touch_matrix) { /* configure touch */ - eve_write16(REG_TOUCH_CONFIG, 0xb81); /* enable touch low power mode: 0xb81 - default: 0x381 */ + eve_write16(REG_TOUCH_CONFIG, 0x381); /* default */ eve_write8(REG_TOUCH_MODE, EVE_TMODE_CONTINUOUS); /* enable touch */ - eve_write16(REG_TOUCH_RZTHRESH, EVE_TOUCH_RZTHRESH); /* eliminate any false touches */ if (touch_calibrate) { eve_write8(REG_PWM_DUTY, 0x40); |