X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/3be69a94facf84cca07986b87e41e7684a903773..419f2c983bc269255b2a4ce279b253de1ff174b7:/usb-driver.h?ds=inline diff --git a/usb-driver.h b/usb-driver.h index 2d184d6..7a8e1ee 100644 --- a/usb-driver.h +++ b/usb-driver.h @@ -15,6 +15,8 @@ #define MAGIC 0xa410b413UL +#define WDU_GET_MAX_PACKET_SIZE(x) ((unsigned short) (((x) & 0x7ff) * (1 + (((x) & 0x1800) >> 11)))) + /* http://www.jungo.com/support/documentation/windriver/811/wdusb_man_mhtml/node78.html#SECTION001734000000000000000 */ struct header_struct { @@ -351,10 +353,15 @@ struct usb_device_info { WDU_INTERFACE *pActiveInterface[WD_USB_MAX_INTERFACES]; }; -struct usb_device_info_get { - WDU_DEVICE_DESCRIPTOR Descriptor; - WDU_PIPE_INFO Pipe0; - unsigned char dummy[128]; - WDU_CONFIGURATION cfg; - -}; +typedef enum { + WDU_DIR_IN = 1, + WDU_DIR_OUT = 2, + WDU_DIR_IN_OUT = 3 +} WDU_DIR; + +typedef enum { + PIPE_TYPE_CONTROL = 0, + PIPE_TYPE_ISOCHRONOUS = 1, + PIPE_TYPE_BULK = 2, + PIPE_TYPE_INTERRUPT = 3 +} USB_PIPE_TYPE;