mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
Merge pull request #27 from jhoenicke/master
New usbDelay that delays and handles USB requests
This commit is contained in:
commit
b4728e6cf9
@ -57,7 +57,7 @@ bool protectButton(ButtonRequestType type, bool confirm_only)
|
||||
|
||||
// button acked - check buttons
|
||||
if (acked) {
|
||||
delay(100000);
|
||||
usbDelay(3500);
|
||||
buttonUpdate();
|
||||
if (button.YesUp) {
|
||||
result = true;
|
||||
@ -165,7 +165,7 @@ bool protectPin(bool use_cached)
|
||||
}
|
||||
layoutDialog(DIALOG_ICON_INFO, NULL, NULL, NULL, "Wrong PIN entered", NULL, "Please wait", secstr, "to continue ...", NULL);
|
||||
// wait one second
|
||||
delay(24000000);
|
||||
usbDelay(840000);
|
||||
}
|
||||
}
|
||||
const char *pin;
|
||||
|
@ -332,3 +332,10 @@ void usbTiny(char set)
|
||||
{
|
||||
tiny = set;
|
||||
}
|
||||
|
||||
void usbDelay(int cycles)
|
||||
{
|
||||
while (cycles--) {
|
||||
usbd_poll(usbd_dev);
|
||||
}
|
||||
}
|
||||
|
@ -24,5 +24,6 @@ void usbInit(void);
|
||||
void usbPoll(void);
|
||||
void usbReconnect(void);
|
||||
void usbTiny(char set);
|
||||
void usbDelay(int cycles);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user