MAke an enum out of reqtype
This commit is contained in:
parent
3593f89bf3
commit
f609c84a7f
2 changed files with 19 additions and 17 deletions
|
@ -49,14 +49,6 @@ typedef enum
|
|||
GRUB_USB_SPEED_HIGH
|
||||
} grub_usb_speed_t;
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT = 0x21,
|
||||
GRUB_USB_REQTYPE_VENDOR_OUT = 0x40,
|
||||
GRUB_USB_REQTYPE_CLASS_INTERFACE_IN = 0xa1,
|
||||
GRUB_USB_REQTYPE_VENDOR_IN = 0xc0
|
||||
};
|
||||
|
||||
/* Call HOOK with each device, until HOOK returns non-zero. */
|
||||
int grub_usb_iterate (int (*hook) (grub_usb_device_t dev));
|
||||
|
||||
|
|
|
@ -74,15 +74,25 @@ struct grub_usb_transfer
|
|||
typedef struct grub_usb_transfer *grub_usb_transfer_t;
|
||||
|
||||
|
||||
#define GRUB_USB_REQTYPE_IN (1 << 7)
|
||||
#define GRUB_USB_REQTYPE_OUT (0 << 7)
|
||||
#define GRUB_USB_REQTYPE_STANDARD (0 << 5)
|
||||
#define GRUB_USB_REQTYPE_CLASS (1 << 5)
|
||||
#define GRUB_USB_REQTYPE_VENDOR (2 << 5)
|
||||
#define GRUB_USB_REQTYPE_TARGET_DEV (0 << 0)
|
||||
#define GRUB_USB_REQTYPE_TARGET_INTERF (1 << 0)
|
||||
#define GRUB_USB_REQTYPE_TARGET_ENDP (2 << 0)
|
||||
#define GRUB_USB_REQTYPE_TARGET_OTHER (3 << 0)
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_USB_REQTYPE_TARGET_DEV = (0 << 0),
|
||||
GRUB_USB_REQTYPE_TARGET_INTERF = (1 << 0),
|
||||
GRUB_USB_REQTYPE_TARGET_ENDP = (2 << 0),
|
||||
GRUB_USB_REQTYPE_TARGET_OTHER = (3 << 0),
|
||||
GRUB_USB_REQTYPE_STANDARD = (0 << 5),
|
||||
GRUB_USB_REQTYPE_CLASS = (1 << 5),
|
||||
GRUB_USB_REQTYPE_VENDOR = (2 << 5),
|
||||
GRUB_USB_REQTYPE_OUT = (0 << 7),
|
||||
GRUB_USB_REQTYPE_IN = (1 << 7),
|
||||
GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT = GRUB_USB_REQTYPE_TARGET_INTERF
|
||||
| GRUB_USB_REQTYPE_CLASS | GRUB_USB_REQTYPE_OUT,
|
||||
GRUB_USB_REQTYPE_VENDOR_OUT = GRUB_USB_REQTYPE_VENDOR | GRUB_USB_REQTYPE_OUT,
|
||||
GRUB_USB_REQTYPE_CLASS_INTERFACE_IN = GRUB_USB_REQTYPE_TARGET_INTERF
|
||||
| GRUB_USB_REQTYPE_CLASS | GRUB_USB_REQTYPE_IN,
|
||||
GRUB_USB_REQTYPE_VENDOR_IN = GRUB_USB_REQTYPE_VENDOR | GRUB_USB_REQTYPE_IN
|
||||
};
|
||||
|
||||
#define GRUB_USB_REQ_GET_STATUS 0x00
|
||||
#define GRUB_USB_REQ_CLEAR_FEATURE 0x01
|
||||
|
|
Loading…
Reference in a new issue