Scan descriptor rather than elying on hardcoded endpoint number

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-20 16:34:34 +02:00
parent a17e3c978b
commit 9ba74de61a
2 changed files with 33 additions and 2 deletions

View file

@ -181,6 +181,20 @@ struct grub_usb_device
typedef enum grub_usb_ep_type
{
GRUB_USB_EP_CONTROL,
GRUB_USB_EP_ISOCHRONOUS,
GRUB_USB_EP_BULK,
GRUB_USB_EP_INTERRUPT
} grub_usb_ep_type_t;
static inline enum grub_usb_ep_type
grub_usb_get_ep_type (struct grub_usb_desc_endp *ep)
{
return ep->attrib & 3;
}
typedef enum
{
GRUB_USB_CLASS_NOTHERE,