diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2008-10-16 19:20:51 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2008-10-16 19:20:51 +0000 |
commit | 4727c0744615d7b49c843197433937721ce9acd1 (patch) | |
tree | 72d31d16bb06950a574b11759d61e620c3be9f46 /payloads/libpayload/curses | |
parent | b1b071fe17dd472192de201e463ce3d5811a2957 (diff) | |
download | coreboot-4727c0744615d7b49c843197433937721ce9acd1.tar.xz |
- reduced memory requirements a lot (from >100kb/controller to
560bytes/controller)
- no need for the client of libpayload to implement
usbdisk_{create,remove}, just because USB was compiled in.
- usb hub support compiles, and works for some trivial cases (no device
detach, trivial power management)
- usb keyboard support works in qemu, though there are reports that it
doesn't work on real hardware yet.
- usb keyboard is integrated in both libc-getchar() and curses, if
CONFIG_USB_HID is enabled
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3662 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/curses')
-rw-r--r-- | payloads/libpayload/curses/keyboard.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c index 5fc54224a0..45bd4442fe 100644 --- a/payloads/libpayload/curses/keyboard.c +++ b/payloads/libpayload/curses/keyboard.c @@ -38,6 +38,7 @@ */ #include <config.h> +#include <usb/usb.h> #include "local.h" static int _halfdelay = 0; @@ -145,6 +146,14 @@ static int curses_getchar(int delay) unsigned short c; do { +#ifdef CONFIG_USB_HID + usb_poll(); + if ((curses_flags & F_ENABLE_CONSOLE) && + usbhid_havechar()) { + c = usbhid_getchar(); + if (c != 0) return c; + } +#endif #ifdef CONFIG_PC_KEYBOARD if ((curses_flags & F_ENABLE_CONSOLE) && keyboard_havechar()) { |