mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-08 09:58:46 +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);
|
ensure(0 == touch_init(), NULL);
|
||||||
|
|
||||||
// delay to detect touch
|
// delay to detect touch
|
||||||
hal_delay(100);
|
uint32_t touched = 0;
|
||||||
bool touched = false;
|
for (int i = 0; i < 100; i++) {
|
||||||
// flush touch events
|
touched |= touch_read();
|
||||||
while (touch_read()) {
|
hal_delay(1);
|
||||||
touched = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// start the bootloader if user touched the screen or no firmware installed
|
// start the bootloader if user touched the screen or no firmware installed
|
||||||
|
Loading…
Reference in New Issue
Block a user