mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
bootloader: fix touch detection at start
This commit is contained in:
parent
ee7e6134a2
commit
749b80ba03
@ -260,11 +260,10 @@ int main(void)
|
||||
ensure(0 == touch_init(), NULL);
|
||||
|
||||
// delay to detect touch
|
||||
hal_delay(100);
|
||||
bool touched = false;
|
||||
// flush touch events
|
||||
while (touch_read()) {
|
||||
touched = true;
|
||||
uint32_t touched = 0;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
touched |= touch_read();
|
||||
hal_delay(1);
|
||||
}
|
||||
|
||||
// start the bootloader if user touched the screen or no firmware installed
|
||||
|
Loading…
Reference in New Issue
Block a user