1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-20 21:38:26 +00:00
Commit Graph

2 Commits

Author SHA1 Message Date
matejcik
c3112fd83d embed/trezorhal: only poll CTPM when touch is detected
Because CTPM dislikes being polled when no touches are seen, keeps
resetting, and maybe freezes once in a while. This is very likely a fix
for #334.

Before, we would simply read the touch registers on every loop. Now we
first check whether the interrupt line is down, which indicates that the
CTPM has data to tell us.

Tracking the `touching` flag is necessary, as sometimes we don't poll
frequently enough to catch the TOUCH_END event before interrupt line
goes up again.
The `last_packet` handling miiight not be necessary - AFAICT, the CTPM
has some sort of buffer and always returns TOUCH_START at first and
TOUCH_END at last. Still, better safe than sorry.
2018-11-26 14:47:06 +01:00
Pavol Rusnak
ddbcd7400f
firmware: enable touch for T1 2018-10-02 18:08:44 +02:00