summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2013-06-25 15:19:48 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2013-06-26 20:51:07 +0200
commit6a008363befb049291fa4a123aa38b2ab2a04701 (patch)
tree78d3071ce8c43ff4b131bdcef2f56fae369c7512 /payloads
parent99b024db885833ebe46be0917f9c2283e3778fac (diff)
downloadcoreboot-6a008363befb049291fa4a123aa38b2ab2a04701.tar.xz
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>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/curses/keyboard.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c
index 7ebb04f111..9648dde573 100644
--- a/payloads/libpayload/curses/keyboard.c
+++ b/payloads/libpayload/curses/keyboard.c
@@ -175,15 +175,15 @@ static int curses_getchar(int _delay)
}
#endif
- if (_delay == 0)
+ if (_delay == 0) {
break;
-
- if (_delay > 0) {
- mdelay(1);
- _delay--;
+ } else if (_delay >= 10) {
+ mdelay(10);
+ _delay -= 10;
+ } else if (_delay > 0) {
+ mdelay(_delay);
+ _delay = 0;
}
-
-
} while (1);
return ERR;