libpayload: Use longer delay in tinycurses' wgetch()

The counted delay of 1ms was shorter than the time usb_poll() took
(~30ms observed). So with a given timeout of 100ms it actually took 3s.
We can lower the problem if we delay 10ms per loop iteration.

Change-Id: I6e084bdd05332111cc8adcd13493a5dfb4bc8b28
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/3533
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Nico Huber 2013-06-25 15:19:48 +02:00 committed by Patrick Georgi
parent 99b024db88
commit 6a008363be
1 changed files with 7 additions and 7 deletions

View File

@ -175,15 +175,15 @@ static int curses_getchar(int _delay)
} }
#endif #endif
if (_delay == 0) if (_delay == 0) {
break; break;
} else if (_delay >= 10) {
if (_delay > 0) { mdelay(10);
mdelay(1); _delay -= 10;
_delay--; } else if (_delay > 0) {
mdelay(_delay);
_delay = 0;
} }
} while (1); } while (1);
return ERR; return ERR;