mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-05 23:58:46 +00:00
show ui_callback always (before and after)
This commit is contained in:
parent
38e92407c7
commit
d7e7d8ef27
10
storage.c
10
storage.c
@ -754,8 +754,13 @@ secbool storage_unlock(uint32_t pin)
|
|||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sleep for 2^ctr - 1 seconds before checking the PIN.
|
|
||||||
uint32_t wait = (1 << ctr) - 1;
|
uint32_t wait = (1 << ctr) - 1;
|
||||||
|
if (ui_callback) {
|
||||||
|
if (sectrue == ui_callback(wait, 0)) {
|
||||||
|
return secfalse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Sleep for 2^ctr - 1 seconds before checking the PIN.
|
||||||
uint32_t progress;
|
uint32_t progress;
|
||||||
for (uint32_t rem = wait; rem > 0; rem--) {
|
for (uint32_t rem = wait; rem > 0; rem--) {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
@ -772,8 +777,7 @@ secbool storage_unlock(uint32_t pin)
|
|||||||
hal_delay(100);
|
hal_delay(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Show last frame if we were waiting
|
if (ui_callback) {
|
||||||
if ((wait > 0) && ui_callback) {
|
|
||||||
if (sectrue == ui_callback(0, 900)) {
|
if (sectrue == ui_callback(0, 900)) {
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user