Contiki 2.6

usb_descriptors.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00002 /*! \file  usb_descriptors.h ***************************************************
00003  *
00004  * \brief
00005  *      This file contains the usb parameters that uniquely identify the
00006  *      application through descriptor tables.
00007  *
00008  * \addtogroup usbstick
00009  *
00010  * \author
00011  *      Atmel Corporation: http://www.atmel.com
00012  * \author
00013  *      Colin O'Flynn <coflynn@newae.com>
00014  *
00015  ******************************************************************************/
00016 /* Copyright (c) 2008  ATMEL Corporation
00017    Copyright (c) 2008 Colin O'Flynn
00018    All rights reserved.
00019 
00020    Redistribution and use in source and binary forms, with or without
00021    modification, are permitted provided that the following conditions are met:
00022 
00023    * Redistributions of source code must retain the above copyright
00024      notice, this list of conditions and the following disclaimer.
00025    * Redistributions in binary form must reproduce the above copyright
00026      notice, this list of conditions and the following disclaimer in
00027      the documentation and/or other materials provided with the
00028      distribution.
00029    * Neither the name of the copyright holders nor the names of
00030      contributors may be used to endorse or promote products derived
00031      from this software without specific prior written permission.
00032 
00033   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00034   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00035   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00036   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00037   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00038   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00039   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00040   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00041   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00042   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00043   POSSIBILITY OF SUCH DAMAGE.
00044 */
00045 
00046 /**
00047   \addtogroup usbconf
00048   @{
00049   */
00050 
00051 #ifndef _USB_USERCONFIG_H_
00052 #define _USB_USERCONFIG_H_
00053 
00054 //_____ I N C L U D E S ____________________________________________________
00055 
00056 #include "config.h"
00057 #include "usb_standard_request.h"
00058 #include "conf_usb.h"
00059 #include <avr/pgmspace.h>
00060 
00061 //_____ M A C R O S ________________________________________________________
00062 
00063 
00064 //_____ U S B    D E F I N E _______________________________________________
00065 
00066                   // USB Device descriptor
00067 #define USB_SPECIFICATION     0x0200
00068 #if USB_CONF_MACINTOSH
00069 #define COMPOSITE_DEVICE_CLASS       0x02      // Misc
00070 #define COMPOSITE_DEVICE_SUB_CLASS   0x00      // Common
00071 #define COMPOSITE_DEVICE_PROTOCOL    0x00      // IAD
00072 #else //Windows wants these for composite device
00073 //Above seems to work for Vista and Win7 but XP and Ubuntu 904 might need the old values
00074 #define COMPOSITE_DEVICE_CLASS       0xEF      // Misc
00075 #define COMPOSITE_DEVICE_SUB_CLASS   0x02      // Common
00076 #define COMPOSITE_DEVICE_PROTOCOL    0x01      // IAD
00077 #endif
00078 
00079 #define NETWORK_DEVICE_CLASS          0x02      // CDC ACM
00080 #define NETWORK_DEVICE_SUB_CLASS      0x02      //
00081 #define NETWORK_DEVICE_PROTOCOL       0xFF      // Vendor-specific
00082 
00083 #define MASS_DEVICE_CLASS            0x00      //
00084 #define MASS_DEVICE_SUB_CLASS        0x00      //
00085 #define MASS_DEVICE_PROTOCOL         0x00      //
00086 
00087 #define EEM_DEVICE_CLASS              0x02      // CDC
00088 #define EEM_DEVICE_SUB_CLASS          0x0C      // EEM
00089 #define EEM_DEVICE_PROTOCOL           0x07      // EEM
00090 
00091 #define EP_CONTROL_LENGTH     64
00092 #define VENDOR_ID             0x03EB // Atmel vendor ID = 03EBh
00093 
00094 #if USB_CONF_MACINTOSH
00095 //A different product ID avoids instant windows corruption when it tries to use the cached drivers
00096 //TODO:Get some valid ID's from Atmel
00097 #define COMPOSITE_PRODUCT_ID  0x9921 //Product ID for composite device
00098 #define NETWORK_PRODUCT_ID    0x9919 //Product ID for just CDC-ECM device
00099 #else
00100 #define COMPOSITE_PRODUCT_ID  0x2021 //Product ID for composite device
00101 #define NETWORK_PRODUCT_ID    0x2019 //Product ID for just RNDIS device
00102 #endif
00103 
00104 #define MASS_PRODUCT_ID       0x202F //Product ID for mass storage
00105 #define RELEASE_NUMBER        0x1000
00106 
00107 enum {
00108         USB_STRING_NONE = 0,
00109         USB_STRING_MAN = 1,
00110         USB_STRING_PRODUCT,
00111         USB_STRING_SERIAL,
00112         USB_STRING_MAC_ADDRESS,
00113         USB_STRING_CONFIG_COMPOSITE,
00114         USB_STRING_CONFIG_RNDIS,
00115         USB_STRING_CONFIG_EEM,
00116         USB_STRING_CONFIG_ECM,
00117         USB_STRING_CONFIG_ECM_DEBUG,
00118         USB_STRING_CONFIG_MS,
00119         USB_STRING_INTERFACE_RNDIS,
00120         USB_STRING_INTERFACE_EEM,
00121         USB_STRING_INTERFACE_ECM,
00122         USB_STRING_INTERFACE_ECM_ATTACHED,
00123         USB_STRING_INTERFACE_ECM_DETACHED,
00124         USB_STRING_INTERFACE_SERIAL,
00125         USB_STRING_INTERFACE_MS,
00126 
00127 };
00128 
00129 enum {
00130         USB_CONFIG_UNCONFIGURED = 0,
00131 
00132         USB_CONFIG_RNDIS                = 1,
00133         USB_CONFIG_RNDIS_DEBUG  = 1+(1<<7),
00134 
00135         USB_CONFIG_ECM                  = 2,
00136         USB_CONFIG_ECM_DEBUG    = 2+(1<<7),
00137         
00138         USB_CONFIG_EEM                  = 3,
00139 
00140 #if USB_CONF_STORAGE
00141         USB_CONFIG_MS                   = 4,
00142 #endif
00143 };
00144 
00145 #define USB_CONFIG_HAS_DEBUG_PORT(x)    ((x==USB_CONFIG_ECM_DEBUG)||(x==USB_CONFIG_RNDIS_DEBUG))
00146 
00147 //#define USB_CONFIG_COUNT (USB_CONFIG_COUNT_PLUS_ONE-1)
00148 //#define NB_CONFIGURATION      USB_CONFIG_COUNT
00149 
00150 #define NETWORK_NB_INTERFACE         2
00151 #define COMPOSITE_NB_INTERFACE       4
00152 #define MASS_NB_INTERFACE            1
00153 #define EEM_NB_INTERFACE          1
00154 #define CONF_NB            1
00155 #define CONF_INDEX         0
00156 #define CONF_ATTRIBUTES    USB_CONFIG_BUSPOWERED
00157 #define MAX_POWER          50          // 100 mA
00158 
00159 /*** CDC RNDIS CONFIGURATION CONFIGURATION ***/
00160 
00161 // Interface 0 descriptor
00162 #define INTERFACE0_NB        0
00163 #define ALTERNATE0           0
00164 #define NB_ENDPOINT0         1
00165 #define INTERFACE0_CLASS     0x02    // CDC ACM Com
00166 #define INTERFACE0_SUB_CLASS 0x02
00167 #define INTERFACE0_PROTOCOL  0xFF        // Vendor specific
00168 #define INTERFACE0_INDEX     0
00169 
00170 // Interface 1 descriptor
00171 #define INTERFACE1_NB        1
00172 #define ALTERNATE1           0
00173 #define NB_ENDPOINT1         2
00174 #define INTERFACE1_CLASS     0x0A    // CDC ACM Data
00175 #define INTERFACE1_SUB_CLASS 0
00176 #define INTERFACE1_PROTOCOL  0
00177 #define INTERFACE1_INDEX     0
00178 
00179              // USB Endpoint 1 descriptor
00180                                  // Interrupt IN
00181 #define ENDPOINT_NB_1       0x80 | INT_EP
00182 #define EP_ATTRIBUTES_1     0x03          // BULK = 0x02, INTERUPT = 0x03
00183 #define EP_SIZE_1           0x08
00184 #define EP_INTERVAL_1       0x01 //ms interrupt pooling from host
00185 
00186              // USB Endpoint 1 descriptor
00187                                  // Bulk IN
00188 #define ENDPOINT_NB_2       0x80 | TX_EP
00189 #define EP_ATTRIBUTES_2     0x02          // BULK = 0x02, INTERUPT = 0x03
00190 #define EP_SIZE_2           0x40  //64 byte max size
00191 #define EP_INTERVAL_2       0x01
00192 
00193              // USB Endpoint 2 descriptor
00194                                  //Bulk OUT  RX endpoint
00195 #define ENDPOINT_NB_3       RX_EP
00196 #define EP_ATTRIBUTES_3     0x02          // BULK = 0x02, INTERUPT = 0x03
00197 #define EP_SIZE_3           0x40  //64 byte max size
00198 #define EP_INTERVAL_3       0x01
00199 
00200 /*** CDC Virtual Serial Port ***/
00201 
00202              // Interface 2 descriptor
00203 #define INTERFACE2_NB        2
00204 #define ALTERNATE2           0
00205 #define NB_ENDPOINT2         1
00206 #define INTERFACE2_CLASS     0x02    // CDC ACM Com
00207 #define INTERFACE2_SUB_CLASS 0x02
00208 #define INTERFACE2_PROTOCOL  0x01
00209 #define INTERFACE2_INDEX     0
00210 
00211              // Interface 3 descriptor
00212 #define INTERFACE3_NB        3
00213 #define ALTERNATE3           0
00214 #define NB_ENDPOINT3         2
00215 #define INTERFACE3_CLASS     0x0A    // CDC ACM Data
00216 #define INTERFACE3_SUB_CLASS 0
00217 #define INTERFACE3_PROTOCOL  0
00218 #define INTERFACE3_INDEX     0
00219 
00220              // USB Endpoint 4 descriptor
00221                                  // Interrupt IN
00222 #define TX_EP_SIZE          0x20
00223 #define ENDPOINT_NB_4       0x80 | VCP_INT_EP
00224 #define EP_ATTRIBUTES_4     0x03          // BULK = 0x02, INTERUPT = 0x03
00225 #define EP_SIZE_4           TX_EP_SIZE
00226 #define EP_INTERVAL_4       0xFF //ms interrupt pooling from host
00227 
00228              // USB Endpoint 5 descriptor
00229                                  // Bulk IN
00230 #define ENDPOINT_NB_5       0x80 | VCP_TX_EP
00231 #define EP_ATTRIBUTES_5     0x02          // BULK = 0x02, INTERUPT = 0x03
00232 #define EP_SIZE_5           0x20
00233 #define EP_INTERVAL_5       0x01
00234 
00235              // USB Endpoint 6 descriptor
00236                                  // Bulk OUT
00237 #define ENDPOINT_NB_6       VCP_RX_EP
00238 #define EP_ATTRIBUTES_6     0x02          // BULK = 0x02, INTERUPT = 0x03
00239 #define EP_SIZE_6           0x20
00240 #define EP_INTERVAL_6       0x01
00241 
00242 /*** Mass Storage ***/
00243 
00244 #define MS_INTERFACE_NB        0
00245 #define MS_ALTERNATE           0
00246 #define MS_NB_ENDPOINT         2
00247 #define MS_INTERFACE_CLASS     0x08             // Mass Storage Class
00248 #define MS_INTERFACE_SUB_CLASS 0x06                     // SCSI transparent Command Set
00249 #define MS_INTERFACE_PROTOCOL  0x50                     // Bulk-Only Transport
00250 #define MS_INTERFACE_INDEX     0
00251 
00252 // USB Endpoint 1 descriptor FS
00253 #define MS_ENDPOINT_NB_1       (MS_IN_EP | 0x80)
00254 #define MS_EP_ATTRIBUTES_1     0x02          // BULK = 0x02, INTERUPT = 0x03
00255 #define MS_EP_IN_LENGTH        64
00256 #define MS_EP_SIZE_1           MS_EP_IN_LENGTH
00257 #define MS_EP_INTERVAL_1       0x00
00258 
00259 
00260 // USB Endpoint 2 descriptor FS
00261 #define MS_ENDPOINT_NB_2       MS_OUT_EP
00262 #define MS_EP_ATTRIBUTES_2     0x02          // BULK = 0x02, INTERUPT = 0x03
00263 #define MS_EP_IN_LENGTH        64
00264 #define MS_EP_SIZE_2           MS_EP_IN_LENGTH
00265 #define MS_EP_INTERVAL_2       0x00
00266 
00267 /******* EEM Configuration *******/
00268 
00269 // Interface 0 descriptor
00270 #define EEM_INTERFACE0_NB        0
00271 #define EEM_ALTERNATE0           0
00272 #define EEM_NB_ENDPOINT0         2
00273 #define EEM_INTERFACE0_CLASS     0x02    // CDC ACM Com
00274 #define EEM_INTERFACE0_SUB_CLASS 0x0C    // EEM
00275 #define EEM_INTERFACE0_PROTOCOL  0x07    // EEM
00276 #define EEM_INTERFACE0_INDEX     0
00277 
00278             // USB Endpoint 1 descriptor
00279             // Bulk IN
00280 #define EEM_ENDPOINT_NB_1       0x80 | TX_EP
00281 #define EEM_EP_ATTRIBUTES_1     0x02          // BULK = 0x02, INTERUPT = 0x03
00282 #define EEM_EP_SIZE_1           0x40 //64 byte max size
00283 #define EEM_EP_INTERVAL_1       0x01
00284 
00285              // USB Endpoint 2 descriptor
00286              // Bulk OUT
00287 #define EEM_ENDPOINT_NB_2       RX_EP
00288 #define EEM_EP_ATTRIBUTES_2     0x02          // BULK = 0x02, INTERUPT = 0x03
00289 #define EEM_EP_SIZE_2           0x40  //64 byte max size
00290 #define EEM_EP_INTERVAL_2       0x01
00291 
00292 /******* ECM Configuration *******/
00293 
00294 // Interface 0 descriptor
00295 #define ECM_INTERFACE0_NB        0
00296 #define ECM_ALTERNATE0           0
00297 #define ECM_NB_ENDPOINT0         2
00298 #define ECM_INTERFACE0_CLASS     0x02    // CDC ACM Com
00299 #define ECM_INTERFACE0_SUB_CLASS 0x06    // ECM
00300 #define ECM_INTERFACE0_PROTOCOL  0x00    // Empty
00301 #define ECM_INTERFACE0_INDEX     0
00302 
00303 
00304 
00305 #define DEVICE_STATUS         0x00 // TBD
00306 #define INTERFACE_STATUS      0x00 // TBD
00307 
00308 #define LANG_ID               0x00
00309 
00310 #define LANGUAGE_ID           0x0409
00311 
00312                   //! Usb Request
00313 typedef struct
00314 {
00315    U8      bmRequestType;        //!< Characteristics of the request
00316    U8      bRequest;             //!< Specific request
00317    U16     wValue;               //!< field that varies according to request
00318    U16     wIndex;               //!< field that varies according to request
00319    U16     wLength;              //!< Number of bytes to transfer if Data
00320 }  S_UsbRequest;
00321 
00322                 //! Usb Device Descriptor
00323 typedef struct {
00324    U8      bLength;              //!< Size of this descriptor in bytes
00325    U8      bDescriptorType;      //!< DEVICE descriptor type
00326    U16     bscUSB;               //!< Binay Coded Decimal Spec. release
00327    U8      bDeviceClass;         //!< Class code assigned by the USB
00328    U8      bDeviceSubClass;      //!< Sub-class code assigned by the USB
00329    U8      bDeviceProtocol;      //!< Protocol code assigned by the USB
00330    U8      bMaxPacketSize0;      //!< Max packet size for EP0
00331    U16     idVendor;             //!< Vendor ID. ATMEL = 0x03EB
00332    U16     idProduct;            //!< Product ID assigned by the manufacturer
00333    U16     bcdDevice;            //!< Device release number
00334    U8      iManufacturer;        //!< Index of manu. string descriptor
00335    U8      iProduct;             //!< Index of prod. string descriptor
00336    U8      iSerialNumber;        //!< Index of S.N.  string descriptor
00337    U8      bNumConfigurations;   //!< Number of possible configurations
00338 }  S_usb_device_descriptor;
00339 
00340 
00341           //! Usb Configuration Descriptor
00342 typedef struct {
00343    U8      bLength;              //!< size of this descriptor in bytes
00344    U8      bDescriptorType;      //!< CONFIGURATION descriptor type
00345    U16     wTotalLength;         //!< total length of data returned
00346    U8      bNumInterfaces;       //!< number of interfaces for this conf.
00347    U8      bConfigurationValue;  //!< value for SetConfiguration resquest
00348    U8      iConfiguration;       //!< index of string descriptor
00349    U8      bmAttibutes;          //!< Configuration characteristics
00350    U8      MaxPower;             //!< maximum power consumption
00351 }  S_usb_configuration_descriptor;
00352 
00353 
00354               //! Usb Interface Descriptor
00355 typedef struct {
00356    U8      bLength;               //!< size of this descriptor in bytes
00357    U8      bDescriptorType;       //!< INTERFACE descriptor type
00358    U8      bInterfaceNumber;      //!< Number of interface
00359    U8      bAlternateSetting;     //!< value to select alternate setting
00360    U8      bNumEndpoints;         //!< Number of EP except EP 0
00361    U8      bInterfaceClass;       //!< Class code assigned by the USB
00362    U8      bInterfaceSubClass;    //!< Sub-class code assigned by the USB
00363    U8      bInterfaceProtocol;    //!< Protocol code assigned by the USB
00364    U8      iInterface;            //!< Index of string descriptor
00365 }  S_usb_interface_descriptor;
00366 
00367 
00368                //! Usb Endpoint Descriptor
00369 typedef struct {
00370    U8      bLength;               //!< Size of this descriptor in bytes
00371    U8      bDescriptorType;       //!< ENDPOINT descriptor type
00372    U8      bEndpointAddress;      //!< Address of the endpoint
00373    U8      bmAttributes;          //!< Endpoint's attributes
00374    U16     wMaxPacketSize;        //!< Maximum packet size for this EP
00375    U8      bInterval;             //!< Interval for polling EP in ms
00376 } S_usb_endpoint_descriptor;
00377 
00378 
00379                //! Usb Device Qualifier Descriptor
00380 typedef struct {
00381    U8      bLength;               //!< Size of this descriptor in bytes
00382    U8      bDescriptorType;       //!< Device Qualifier descriptor type
00383    U16     bscUSB;                //!< Binay Coded Decimal Spec. release
00384    U8      bDeviceClass;          //!< Class code assigned by the USB
00385    U8      bDeviceSubClass;       //!< Sub-class code assigned by the USB
00386    U8      bDeviceProtocol;       //!< Protocol code assigned by the USB
00387    U8      bMaxPacketSize0;       //!< Max packet size for EP0
00388    U8      bNumConfigurations;    //!< Number of possible configurations
00389    U8      bReserved;             //!< Reserved for future use, must be zero
00390 } S_usb_device_qualifier_descriptor;
00391 
00392 
00393                //! Usb Language Descriptor
00394 typedef struct {
00395    U8      bLength;               //!< size of this descriptor in bytes
00396    U8      bDescriptorType;       //!< STRING descriptor type
00397    U16     wlangid;               //!< language id
00398 } S_usb_language_id;
00399 
00400 
00401 /*_____ U S B   I A D _______________________________________________________*/
00402 
00403 #define DSC_TYPE_IAD  11
00404 
00405 typedef struct
00406 {
00407         U8 bLength;
00408         U8 bDescriptorType;
00409         U8 bFirstInterface;
00410         U8 bInterfaceCount;
00411         U8 bFunctionClass;
00412         U8 bFunctionSubClass;
00413         U8 bFunctionProtocol;
00414         U8 iInterface;
00415 } S_usb_interface_association_descriptor;
00416 
00417 /*_____ U S B   D E S C R I P T O R __________________________________*/
00418 
00419 /* RNDIS + Serial Port */
00420 typedef struct
00421 {
00422    S_usb_configuration_descriptor cfg;
00423 
00424   S_usb_interface_association_descriptor   iad0;
00425    S_usb_interface_descriptor     ifc0;
00426         U8 CS1_INTERFACE[19];
00427  S_usb_endpoint_descriptor      ep1;
00428    S_usb_interface_descriptor     ifc1;
00429    S_usb_endpoint_descriptor      ep2;
00430    S_usb_endpoint_descriptor      ep3;
00431 
00432   S_usb_interface_association_descriptor   iad1;
00433    S_usb_interface_descriptor     ifc2;
00434         U8 CS2_INTERFACE[19];
00435    S_usb_endpoint_descriptor      ep4;
00436    S_usb_interface_descriptor     ifc3;
00437    S_usb_endpoint_descriptor      ep5;
00438    S_usb_endpoint_descriptor      ep6;
00439 
00440 } S_usb_user_configuration_descriptor_composite;
00441 
00442 /* Just RNDIS */
00443 typedef struct
00444 {
00445    S_usb_configuration_descriptor cfg;
00446    S_usb_interface_descriptor     ifc0;
00447         U8 CS1_INTERFACE[19];
00448    S_usb_endpoint_descriptor      ep1;
00449    S_usb_interface_descriptor     ifc1;
00450    S_usb_endpoint_descriptor      ep2;
00451    S_usb_endpoint_descriptor      ep3;
00452 
00453 } S_usb_user_configuration_descriptor_network;
00454 
00455 /* EEM */
00456 typedef struct
00457 {
00458    S_usb_configuration_descriptor cfg;
00459    S_usb_interface_descriptor     ifc0;
00460    S_usb_endpoint_descriptor      ep1;
00461    S_usb_endpoint_descriptor      ep2;
00462 } S_usb_user_configuration_descriptor_eem;
00463 
00464 
00465 
00466 
00467 typedef struct
00468 {
00469         U8 bLength;
00470         U8 bDescriptorType;
00471         U8 bDescriptorSubtype;
00472         U8 iMACAddress;
00473         U32 bmEthernetStatistics;
00474         U16 wMaxSegmentSize;
00475         U16 wNumberMCFilters;
00476         U8 bNumberPowerFilters;
00477 } S_usb_ethernet_networking_functional_descriptor;
00478 
00479 
00480 /* ECM */
00481 typedef struct
00482 {
00483    S_usb_configuration_descriptor cfg;
00484    S_usb_interface_descriptor     ifc0;
00485    U8 CS1_INTERFACE[5+5];
00486    S_usb_ethernet_networking_functional_descriptor fd0;
00487 #if CDC_ECM_USES_INTERRUPT_ENDPOINT
00488    S_usb_endpoint_descriptor      ep1;
00489 #endif
00490 #if 0
00491    S_usb_interface_descriptor     ifc1_0;
00492 #endif
00493    S_usb_interface_descriptor     ifc1_1;
00494    S_usb_endpoint_descriptor      ep2;
00495    S_usb_endpoint_descriptor      ep3;
00496 } S_usb_user_configuration_descriptor_ecm;
00497 
00498 
00499 /* ECM + Serial Port */
00500 typedef struct
00501 {
00502    S_usb_configuration_descriptor cfg;
00503   S_usb_interface_association_descriptor   iad0;
00504    S_usb_interface_descriptor     ifc0;
00505    U8 CS1_INTERFACE[5+5];
00506    S_usb_ethernet_networking_functional_descriptor fd0;
00507 #if CDC_ECM_USES_INTERRUPT_ENDPOINT
00508    S_usb_endpoint_descriptor      ep1;
00509 #endif
00510 #if 0
00511    S_usb_interface_descriptor     ifc1_0;
00512 #endif
00513    S_usb_interface_descriptor     ifc1_1;
00514    S_usb_endpoint_descriptor      ep2;
00515    S_usb_endpoint_descriptor      ep3;
00516 
00517   S_usb_interface_association_descriptor   iad1;
00518    S_usb_interface_descriptor     ifc2;
00519         U8 CS2_INTERFACE[19];
00520    S_usb_endpoint_descriptor      ep4;
00521    S_usb_interface_descriptor     ifc3;
00522    S_usb_endpoint_descriptor      ep5;
00523    S_usb_endpoint_descriptor      ep6;
00524 
00525 } S_usb_user_configuration_descriptor_ecm_debug;
00526 
00527 
00528 /* Mass Storage */
00529 
00530 typedef struct
00531 {
00532    S_usb_configuration_descriptor cfg;
00533    S_usb_interface_descriptor     ifc0;
00534    S_usb_endpoint_descriptor      ep1;
00535    S_usb_endpoint_descriptor      ep2;
00536 
00537 } S_usb_user_configuration_descriptor_mass;
00538 
00539 
00540 
00541 PGM_VOID_P Usb_get_dev_desc_pointer(void);
00542 U8 Usb_get_dev_desc_length(void);
00543 PGM_VOID_P  Usb_get_conf_desc_pointer(U8 index) ;
00544 U8  Usb_get_conf_desc_length(U8 index);
00545 
00546 #endif // _USB_USERCONFIG_H_
00547 
00548 /** @} */