--- ecos-trunk/ecos/packages/io/usb/common/current/include/usb.h 2006-03-02 19:40:08.000000000 +0100 +++ ecos_branch/ecos/ecos/packages/io/usb/common/current/include/usb.h 2006-03-07 12:38:01.000000000 +0100 @@ -110,13 +110,23 @@ typedef struct usb_devreq { #define USB_DEVREQ_DESCRIPTOR_TYPE_STRING 3 #define USB_DEVREQ_DESCRIPTOR_TYPE_INTERFACE 4 #define USB_DEVREQ_DESCRIPTOR_TYPE_ENDPOINT 5 +#define USB_DEVREQ_DESCRIPTOR_TYPE_QUALIFIER 6 +#define USB_DEVREQ_DESCRIPTOR_TYPE_OTHER_SPEED_CFG 7 // Feature selectors. These go into value_lo for the CLEAR_FEATURE and // SET_FEATURE requests, and in the first response byte for // GET_STATUS. #define USB_DEVREQ_FEATURE_DEVICE_REMOTE_WAKEUP 1 +#define USB_DEVREQ_FEATURE_DEVICE_TEST_MODE 2 #define USB_DEVREQ_FEATURE_ENDPOINT_HALT 0 +// test modes +#define USB_DEVREQ_TEST_MODE_TEST_J 1 +#define USB_DEVREQ_TEST_MODE_TEST_K 2 +#define USB_DEVREQ_TEST_MODE_TEST_SE0_NAK 3 +#define USB_DEVREQ_TEST_MODE_TEST_Packet 4 + + // Index decoding. When the CLEAR_FEATURE, SET_FEATURE and GET_STATUS // requests is applied to an endpoint (as per the recipient field in // the type field) index_lo identifies the endpoint. @@ -147,6 +157,20 @@ typedef struct usb_device_descriptor { unsigned char number_configurations; } __attribute__((packed)) usb_device_descriptor; +typedef struct usb_device_qualifier +{ + unsigned char length; + unsigned char type; + unsigned char usb_spec_lo; + unsigned char usb_spec_hi; + unsigned char device_class; + unsigned char device_subclass; + unsigned char device_protocol; + unsigned char max_packet_size; + unsigned char number_configurations; + unsigned char reserved; +} __attribute__((packed)) usb_device_qualifier; + #define USB_DEVICE_DESCRIPTOR_LENGTH 18 #define USB_DEVICE_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_DEVICE #define USB_DEVICE_DESCRIPTOR_USB11_LO 0x10 @@ -159,6 +183,12 @@ typedef struct usb_device_descriptor { #define USB_DEVICE_DESCRIPTOR_PROTOCOL_INTERFACE 0x00 #define USB_DEVICE_DESCRIPTOR_PROTOCOL_VENDOR 0x00FF +#define USB_DEVICE_QUALIFIER_LENGTH 10 +#define USB_DEVICE_QUALIFIER_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_QUALIFIER +#define USB_DEVICE_QUALIFIER_CLASS_INTERFACE 0 +#define USB_DEVICE_QUALIFIER_SUBCLASS_INTERFACE 0 +#define USB_DEVICE_QUALIFIER_PROTOCOL_INTERFACE 0 + typedef struct usb_configuration_descriptor { unsigned char length; unsigned char type; @@ -176,6 +206,7 @@ typedef struct usb_configuration_descrip #define USB_CONFIGURATION_DESCRIPTOR_ATTR_REQUIRED (1 << 7) #define USB_CONFIGURATION_DESCRIPTOR_ATTR_SELF_POWERED (1 << 6) #define USB_CONFIGURATION_DESCRIPTOR_ATTR_REMOTE_WAKEUP (1 << 5) +#define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE USB_DEVREQ_DESCRIPTOR_TYPE_OTHER_SPEED_CFG typedef struct usb_interface_descriptor { unsigned char length; @@ -244,6 +275,5 @@ typedef struct usb_endpoint_descriptor { #ifdef __cplusplus } // extern "C" { #endif - #endif // CYGONCE_USB_H