/* usb2/defs.h
 *
 * (c) 2003 Simtec Electronics
 *
 * Ben Dooks, Vincent Sanders
 *
 * USB2 definitions to go with the header files
 *
 * $Id: defs.h,v 1.2 2003/10/20 15:40:36 ben Exp $
 *
 * This Library file is part of the Simtec Electronics USB stack development
 *   suite.
 * Specific licence is granted to use this file by third parties for the
 *   development of USB device drivers.
*/

#ifndef __USB2_DEFS_H
#define __USB2_DEFS_H "$Id: defs.h,v 1.2 2003/10/20 15:40:36 ben Exp $"

#ifndef __USB_DEFS_H
#include "usb/defs.h"
#endif

/** device speed for USB2 480MBit/sec */
#define USB_DEVICE_SPEED_HIGH       0x02

/* Descriptor types */
#define USB_CONTROL_DESCRIPTOR_DEVICE_QUALIFIER          0x06
#define USB_CONTROL_DESCRIPTOR_OTHER_SPEED_CONFIGURATION 0x07
#define USB_CONTROL_DESCRIPTOR_INTERFACE_POWER           0x08
#define USB_CONTROL_DESCRIPTOR_OTG                       0x09
#define USB_CONTROL_DESCRIPTOR_DEBUG                     0x0A
#define USB_CONTROL_DESCRIPTOR_INTERFACE_ASSOCIATION     0x0B

/* Setup features */
#define USB_CONTROL_FEATURE_TEST_MODE            0x02

/* feature test modes */
#define USB_CONTROL_FEATURE_TEST_J            0x01
#define USB_CONTROL_FEATURE_TEST_K            0x02
#define USB_CONTROL_FEATURE_TEST_SE0_NAK      0x03
#define USB_CONTROL_FEATURE_TEST_PACKET       0x04
#define USB_CONTROL_FEATURE_TEST_FORCE_ENABLE 0x05


/* Device_Qualifier Descriptor */
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bcdUSB                 0x00020002
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bDeviceClass           0x00010004
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bDeviceSubClass        0x00010005
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bDeviceProtocol        0x00010006
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bMaxPacketSize0        0x00010007
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bNumConfigurations     0x00010008
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_bReserved              0x00010009
#define USB_STRUCT_DESCR_DEVICE_QUALIFIER_SIZE                   0x0000000A

/* Other_Speed_Configuration */
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_wTotalLength        0x00020002
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_bNumInterfaces      0x00010004
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_bConfigurationValue 0x00010005
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_iConfiguration      0x00010006
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_bmAttributes        0x00010007
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_bMaxPower           0x00010008
#define USB_STRUCT_DESCR_OTHER_CONFIGURATION_SIZE                0x00000009

/* Interface association */
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_bFirstInterface   0x00010002
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_bInterfaceCount   0x00010003
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_bFunctionClass    0x00010004
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_bFunctionSubClass 0x00010005
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_bFunctionProtocol 0x00010006
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_iFunction         0x00010007
#define USB_STRUCT_DESCR_INTERFACE_ASSOCIATION_SIZE              0x00000008


#endif /* __USB2_DEFS_H */
