]> cvs.zerfleddert.de Git - usb-driver/blobdiff - usb-driver.h
shorter udev install
[usb-driver] / usb-driver.h
index 51e4b6ed4d70efff74b2fdd58e1b0e9bea4f9206..7a8e1eebb5cab26144905b220b6044f6e981449b 100644 (file)
@@ -15,6 +15,8 @@
 
 #define MAGIC 0xa410b413UL
 
 
 #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 {
 /* http://www.jungo.com/support/documentation/windriver/811/wdusb_man_mhtml/node78.html#SECTION001734000000000000000 */
 
 struct header_struct {
@@ -343,7 +345,7 @@ typedef struct
        WDU_INTERFACE *pInterfaces;
 } WDU_CONFIGURATION;
 
        WDU_INTERFACE *pInterfaces;
 } WDU_CONFIGURATION;
 
-struct wdu_device_info {
+struct usb_device_info {
        WDU_DEVICE_DESCRIPTOR Descriptor;
        WDU_PIPE_INFO Pipe0;
        WDU_CONFIGURATION *pConfigs;
        WDU_DEVICE_DESCRIPTOR Descriptor;
        WDU_PIPE_INFO Pipe0;
        WDU_CONFIGURATION *pConfigs;
@@ -351,3 +353,15 @@ struct wdu_device_info {
        WDU_INTERFACE *pActiveInterface[WD_USB_MAX_INTERFACES];
 };
 
        WDU_INTERFACE *pActiveInterface[WD_USB_MAX_INTERFACES];
 };
 
+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;
Impressum, Datenschutz