1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
trezor-firmware/embed
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
..
boardloader boardloader, sdcard: avoid fatal error when card is ejected during countdown 2018-07-25 11:52:28 +02:00
bootloader unix: refactor T1 touch events to behave similarly to T2 touch events 2018-10-02 17:24:47 +02:00
extmod embed/extmod/modtrezorconfig: small refactor to storage 2018-11-14 16:25:36 +01:00
firmware firmware: bump to 2.0.10 2018-11-05 16:03:16 +01:00
prodtest unix: refactor T1 touch events to behave similarly to T2 touch events 2018-10-02 17:24:47 +02:00
reflash boardloader/bootloader: use static const for sector arrays; erase storage if firmware is broken 2018-06-06 01:03:06 +02:00
trezorhal embed/trezorhal: only poll CTPM when touch is detected 2018-11-26 14:47:06 +01:00
unix embed/trezorhal+unix: small refactor to flash.c 2018-11-14 15:12:19 +01:00
vendorheader embed/vendorheader: add unsafe_signed_prod, use it by default 2018-02-08 16:45:23 +01:00