From cdaf3fc5802acf2ddc7972a15649ab0e1b31b873 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 13 Apr 2009 20:39:46 -0700 Subject: USB working up through reading strings --- ao_usb.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ao_usb.h') diff --git a/ao_usb.h b/ao_usb.h index cbd0f3a7..84f92877 100644 --- a/ao_usb.h +++ b/ao_usb.h @@ -18,13 +18,17 @@ #ifndef _AO_USB_H_ #define _AO_USB_H_ +#define AO_USB_SETUP_DIR_MASK (0x01 << 7) +#define AO_USB_SETUP_TYPE_MASK (0x03 << 5) +#define AO_USB_SETUP_RECIP_MASK (0x1f) + #define AO_USB_DIR_OUT 0 -#define AO_USB_DIR_IN 1 +#define AO_USB_DIR_IN (1 << 7) #define AO_USB_TYPE_STANDARD 0 -#define AO_USB_TYPE_CLASS 1 -#define AO_USB_TYPE_VENDOR 2 -#define AO_USB_TYPE_RESERVED 3 +#define AO_USB_TYPE_CLASS (1 << 5) +#define AO_USB_TYPE_VENDOR (2 << 5) +#define AO_USB_TYPE_RESERVED (3 << 5) #define AO_USB_RECIP_DEVICE 0 #define AO_USB_RECIP_INTERFACE 1 -- cgit v1.2.3