summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--common/usb_kbd.c6
-rw-r--r--include/usb.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/README b/README
index f9c1978c3..294f0c1dc 100644
--- a/README
+++ b/README
@@ -901,6 +901,9 @@ The following options need to be configured:
CONFIG_USB_CONFIG
for differential drivers: 0x00001000
for single ended drivers: 0x00005000
+ CFG_USB_EVENT_POLL
+ May be defined to allow interrupt polling
+ instead of using asynchronous interrupts
- USB Device:
Define the below if you wish to use the USB console.
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 56c21660f..aec558ad2 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -129,7 +129,11 @@ static int usb_kbd_testc(void)
static int usb_kbd_getc(void)
{
char c;
- while(usb_in_pointer==usb_out_pointer);
+ while(usb_in_pointer==usb_out_pointer) {
+#ifdef CFG_USB_EVENT_POLL
+ usb_event_poll();
+#endif
+ }
if((usb_out_pointer+1)==USB_KBD_BUFFER_LEN)
usb_out_pointer=0;
else
diff --git a/include/usb.h b/include/usb.h
index 504ccc40f..4e1539fa8 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -180,6 +180,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len,struct devrequest *setup);
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, int interval);
+void usb_event_poll(void);
/* Defines */
#define USB_UHCI_VEND_ID 0x8086