[tuxdroid-svn] r970 - software_suite_v2/middleware/tuxdriver/trunk/src
Status: Beta
Brought to you by:
ks156
From: eFfeM <c2m...@c2...> - 2008-04-19 15:28:51
|
Author: eFfeM Date: 2008-04-19 17:28:53 +0200 (Sat, 19 Apr 2008) New Revision: 970 Modified: software_suite_v2/middleware/tuxdriver/trunk/src/usb.h Log: aligned constants Modified: software_suite_v2/middleware/tuxdriver/trunk/src/usb.h =================================================================== --- software_suite_v2/middleware/tuxdriver/trunk/src/usb.h 2008-04-19 15:23:15 UTC (rev 969) +++ software_suite_v2/middleware/tuxdriver/trunk/src/usb.h 2008-04-19 15:28:53 UTC (rev 970) @@ -4,6 +4,9 @@ #include <stdlib.h> #include <windows.h> +/* ensure byte-packed structures */ +#include <pshpack1.h> + /* * 'interface' is defined somewhere in the Windows header files. This macro * is deleted here to avoid conflicts and compile errors. @@ -31,14 +34,14 @@ /* * Device and/or Interface Class codes */ -#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ -#define USB_CLASS_AUDIO 1 -#define USB_CLASS_COMM 2 -#define USB_CLASS_HID 3 -#define USB_CLASS_PRINTER 7 -#define USB_CLASS_MASS_STORAGE 8 -#define USB_CLASS_HUB 9 -#define USB_CLASS_DATA 10 +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_DATA 10 #define USB_CLASS_VENDOR_SPEC 0xff /* @@ -47,12 +50,12 @@ #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02 #define USB_DT_STRING 0x03 -#define USB_DT_INTERFACE 0x04 -#define USB_DT_ENDPOINT 0x05 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 #define USB_DT_HID 0x21 -#define USB_DT_REPORT 0x22 -#define USB_DT_PHYSICAL 0x23 +#define USB_DT_REPORT 0x22 +#define USB_DT_PHYSICAL 0x23 #define USB_DT_HUB 0x29 /* @@ -66,10 +69,7 @@ #define USB_DT_HUB_NONVAR_SIZE 7 -/* ensure byte-packed structures */ -#include <pshpack1.h> - /* All standard descriptors have these 2 fields in common */ struct usb_descriptor_header { unsigned char bLength; @@ -191,19 +191,19 @@ /* * Standard requests */ -#define USB_REQ_GET_STATUS 0x00 -#define USB_REQ_CLEAR_FEATURE 0x01 +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 /* 0x02 is reserved */ -#define USB_REQ_SET_FEATURE 0x03 +#define USB_REQ_SET_FEATURE 0x03 /* 0x04 is reserved */ -#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_SET_ADDRESS 0x05 #define USB_REQ_GET_DESCRIPTOR 0x06 #define USB_REQ_SET_DESCRIPTOR 0x07 #define USB_REQ_GET_CONFIGURATION 0x08 #define USB_REQ_SET_CONFIGURATION 0x09 -#define USB_REQ_GET_INTERFACE 0x0A -#define USB_REQ_SET_INTERFACE 0x0B -#define USB_REQ_SYNCH_FRAME 0x0C +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C #define USB_TYPE_STANDARD (0x00 << 5) #define USB_TYPE_CLASS (0x01 << 5) @@ -211,8 +211,8 @@ #define USB_TYPE_RESERVED (0x03 << 5) #define USB_RECIP_DEVICE 0x00 -#define USB_RECIP_INTERFACE 0x01 -#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 #define USB_RECIP_OTHER 0x03 /* |