mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 07:03:31 +08:00
USB event poll support
This patch adds USB event poll support, which could be used in usbkbd and other usb devices driver when the asynchronous interrupt processing is supported. Signed-off-by: Zhang Wei <wei.zhang@freescale.com
This commit is contained in:
parent
9a1d00fa47
commit
fdcfaa1b02
3
README
3
README
@ -901,6 +901,9 @@ The following options need to be configured:
|
|||||||
CONFIG_USB_CONFIG
|
CONFIG_USB_CONFIG
|
||||||
for differential drivers: 0x00001000
|
for differential drivers: 0x00001000
|
||||||
for single ended drivers: 0x00005000
|
for single ended drivers: 0x00005000
|
||||||
|
CFG_USB_EVENT_POLL
|
||||||
|
May be defined to allow interrupt polling
|
||||||
|
instead of using asynchronous interrupts
|
||||||
|
|
||||||
- USB Device:
|
- USB Device:
|
||||||
Define the below if you wish to use the USB console.
|
Define the below if you wish to use the USB console.
|
||||||
|
@ -129,7 +129,11 @@ static int usb_kbd_testc(void)
|
|||||||
static int usb_kbd_getc(void)
|
static int usb_kbd_getc(void)
|
||||||
{
|
{
|
||||||
char c;
|
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)
|
if((usb_out_pointer+1)==USB_KBD_BUFFER_LEN)
|
||||||
usb_out_pointer=0;
|
usb_out_pointer=0;
|
||||||
else
|
else
|
||||||
|
@ -180,6 +180,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
|
|||||||
int transfer_len,struct devrequest *setup);
|
int transfer_len,struct devrequest *setup);
|
||||||
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
|
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
|
||||||
int transfer_len, int interval);
|
int transfer_len, int interval);
|
||||||
|
void usb_event_poll(void);
|
||||||
|
|
||||||
/* Defines */
|
/* Defines */
|
||||||
#define USB_UHCI_VEND_ID 0x8086
|
#define USB_UHCI_VEND_ID 0x8086
|
||||||
|
Loading…
Reference in New Issue
Block a user