1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
trezor-firmware/embed/trezorhal
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
..
common.c extmod/modtrezorui: prepare display UI for model change 2018-09-11 16:01:06 +02:00
common.h extmod/modtrezorui: prepare display UI for model change 2018-09-11 16:01:06 +02:00
flash.c embed/extmod/modtrezorconfig: small refactor to storage 2018-11-14 16:25:36 +01:00
flash.h embed/trezorhal+unix: small refactor to flash.c 2018-11-14 15:12:19 +01:00
image.c embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
image.h embed: refactor sector_count constants 2018-06-20 14:54:15 +02:00
mini_printf.c rename /micropython to /embed 2017-07-28 16:23:45 +02:00
mini_printf.h rename /micropython to /embed 2017-07-28 16:23:45 +02:00
mpu.c embed/firmware: add T1 display support, apply T1 fixes 2018-09-30 16:12:04 +02:00
mpu.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
rng.c embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
rng.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
sbu.c embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
sbu.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
sdcard.c embed: wait 100ms after turning off sdcard/touch circuit 2018-07-24 14:24:00 +02:00
sdcard.h embed: refactor sdcard/touch, extract touch_power_on/off functions from touch_init 2018-07-23 11:58:35 +02:00
secbool.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
stm32.c embed/firmware: add T1 display support, apply T1 fixes 2018-09-30 16:12:04 +02:00
stm32f4xx_hal_conf.h trezorhal: enable USB on T1 2018-10-02 16:29:34 +02:00
systick.c embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
touch_1.h trezorhal: minor cleanup in touch for T1 2018-10-02 19:03:06 +02:00
touch_t.h embed/trezorhal: only poll CTPM when touch is detected 2018-11-26 14:47:06 +01:00
touch.c trezorhal: minor cleanup in touch for T1 2018-10-02 19:03:06 +02:00
touch.h unix: emulator debug build options 2018-10-11 16:33:45 +02:00
usb_hid-defs.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb_hid-impl.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb_vcp-defs.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb_vcp-impl.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb_webusb-defs.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb_webusb-impl.h embed: add GPLv3 source code headers 2018-02-26 14:07:37 +01:00
usb.c firmware: disable WebUSB landing page (#174) 2018-06-04 13:50:23 +02:00
usb.h firmware: disable WebUSB landing page (#174) 2018-06-04 13:50:23 +02:00
usbd_conf.c rename /micropython to /embed 2017-07-28 16:23:45 +02:00
usbd_conf.h trezorhal: add winusb magic to webusb interface 2018-01-21 15:40:31 +01:00
usbd_core.c trezorhal: fix usb class behaviour 2018-02-03 16:40:51 +01:00
usbd_core.h rename /micropython to /embed 2017-07-28 16:23:45 +02:00
usbd_ctlreq.c trezorhal: fix typos 2018-02-02 17:41:49 +01:00
usbd_ctlreq.h trezorhal: add configuration, interface strings to usb descriptors, minor typos 2018-01-20 21:48:53 +01:00
usbd_def.h trezorhal: add winusb magic to webusb interface 2018-01-21 15:40:31 +01:00
usbd_ioreq.c rename /micropython to /embed 2017-07-28 16:23:45 +02:00
usbd_ioreq.h rename /micropython to /embed 2017-07-28 16:23:45 +02:00
util.s embed/trezorhal: introduce jump_to_unprivileged, disable mpu in bootloader 2018-02-13 20:51:14 +01:00
vectortable.s trezorhal: call shutdown in default_handler 2017-10-29 17:50:50 +01:00