SAMV71 Xplained Ultra Software Package 1.4

USBDDriverDescriptors.c

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  *         SAM Software Package License 
00003  * ----------------------------------------------------------------------------
00004  * Copyright (c) 2011, Atmel Corporation
00005  *
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions are met:
00010  *
00011  * - Redistributions of source code must retain the above copyright notice,
00012  * this list of conditions and the disclaimer below.
00013  *
00014  * Atmel's name may not be used to endorse or promote products derived from
00015  * this software without specific prior written permission.
00016  *
00017  * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
00018  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00019  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
00020  * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
00021  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00022  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
00023  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00024  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00025  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00026  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  * ----------------------------------------------------------------------------
00028  */
00029 
00030 
00031 /**\file
00032     Title: HIDDKeyboardDriverDescriptors
00033 
00034     About: Purpose
00035         Declaration of the descriptors used by the HID device keyboard driver.
00036 */
00037 
00038 /** \addtogroup usbd_hid_key
00039  *@{
00040  */
00041 
00042 /*------------------------------------------------------------------------------
00043  *         Headers
00044  *----------------------------------------------------------------------------*/
00045 
00046 #include <USBD_Config.h>
00047 
00048 #include <USBDescriptors.h>
00049 #include <VIDEODescriptors.h>
00050 #include <USBDDriver.h>
00051 
00052 /* ------------------- USB Video ----------------------- */
00053 /** USB Device descriptor. */
00054 
00055 const USBDeviceDescriptor usbDeviceDescriptor =
00056 {
00057     sizeof(USBDeviceDescriptor),
00058     USBGenericDescriptor_DEVICE,
00059     USBDeviceDescriptor_USB2_00,
00060     VIDDeviceDescriptor_CLASS,
00061     VIDDeviceDescriptor_SUBCLASS,
00062     VIDDeviceDescriptor_PROTOCOL,
00063     CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
00064     USBD_VID_ATMEL, // Atmel vendor ID
00065     USBD_PID_UVC, // Product ID
00066     USBD_RELEASE_0_01, // Product release 0.01
00067     0, // No manufacturer string descriptor
00068     0, // No product string descriptor
00069     0, // No serial number string descriptor
00070     1 // One possible configuration
00071 };
00072 
00073 /** Device qualifier descriptor (to pass USB test). */
00074 
00075 static const USBDeviceQualifierDescriptor qualifierDescriptor = {
00076 
00077     sizeof(USBDeviceQualifierDescriptor),
00078     USBGenericDescriptor_DEVICEQUALIFIER,
00079     USBDeviceDescriptor_USB2_00,
00080     VIDDeviceDescriptor_CLASS,
00081     VIDDeviceDescriptor_SUBCLASS,
00082     VIDDeviceDescriptor_PROTOCOL,
00083     CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
00084     1, // Device has one possible configuration.
00085     0x00
00086 };
00087 
00088 /**  Configuration descriptors. */
00089 
00090 const struct UsbVideoCamConfigurationDescriptors configurationDescriptorsFS =
00091 {
00092     /* Configuration descriptor */
00093     {
00094         sizeof(USBConfigurationDescriptor),
00095         USBGenericDescriptor_CONFIGURATION,
00096         sizeof(struct UsbVideoCamConfigurationDescriptors),
00097         2, /* 2 interface in this configuration */
00098         1, /* This is configuration #1 */
00099         0, /* No string descriptor for this configuration */
00100         BOARD_USB_BMATTRIBUTES,
00101         USBConfigurationDescriptor_POWER(100)
00102     },
00103     /* IAD */
00104     {
00105         sizeof(USBInterfaceAssociationDescriptor),
00106         USBGenericDescriptor_INTERFACEASSOCIATION,
00107         VIDCAMD_ControlInterfaceNum, /* Start interface is #0 */
00108         2, /* 2 interface is associated */
00109         VIDIADDescriptor_CLASS,
00110         VIDIADDescriptor_SUBCLASS,
00111         VIDIADDescriptor_PROTOCOL,
00112         0
00113     },
00114     /* VC Interface descriptor */
00115     {
00116         sizeof(USBInterfaceDescriptor),
00117         USBGenericDescriptor_INTERFACE,
00118         VIDCAMD_ControlInterfaceNum, /* This is interface #0 */
00119         0, /* This is setting #0 for interface */
00120         0,
00121         VIDControlInterfaceDescriptor_CLASS,    /* CC_VIDEO */
00122         VIDControlInterfaceDescriptor_SUBCLASS, /* SC_VIDEOCONTROL */
00123         VIDControlInterfaceDescriptor_PROTOCOL, /* PC_PROTOCOL_UNDEFINED */
00124         0, /* No string descriptor */
00125     },
00126     /* VC Class defined descriptors */
00127     {
00128         /* VC Header */
00129         {
00130             sizeof(UsbVideoControlInterfaceHeader1),
00131             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00132             VIDGenericDescriptor_HEADER,    /* VC_HEADER */
00133             VIDHeaderDescriptor_VID1_00,
00134             sizeof(UsbVideoControlInterfaceDescriptor),
00135             BOARD_MCK,
00136             1, /* 1 VideoStreaming interface */
00137             VIDCAMD_StreamInterfaceNum, /* VideoStreaming interface 1: interface #1 */
00138         },
00139         /* VC Camera Terminal */
00140         {
00141             sizeof(USBVideoCameraTerminalDescriptor),
00142             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00143             VIDGenericDescriptor_INPUTTERMINAL, /* VC_INPUT_TERMINAL */
00144             1, /* Terminal ID: #1 */
00145             VIDInputTerminalDescriptor_CAMERA, /* ITT_CAMERA */
00146             0, /* Assoc: None */
00147             0, /* No string */
00148             0, /* Optical Zoom not supported */
00149             0, /* Optical Zoom not supported */
00150             0, /* Optical Zoom not supported */
00151             3, /* 3 bytes for bmControls */
00152             {0, 0, 0}
00153         },
00154         /* VC Output Terminal */
00155         {
00156             sizeof(USBVideoOutputTerminalDescriptor),
00157             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00158             VIDGenericDescriptor_OUTPUTTERMINAL, /* VC_OUTPUT_TERMINAL */
00159             2, /* Terminal ID: #2 */
00160             VIDTerminalDescriptor_STREAMING, /* Streaming terminal */
00161             0, /* Assoc: None */
00162             1, /* Source: Terminal is connected to #1 */
00163             0  /* No string */
00164         }
00165         
00166     },
00167     /* VS Interface descriptor */
00168     {
00169         sizeof(USBInterfaceDescriptor),
00170         USBGenericDescriptor_INTERFACE,
00171         VIDCAMD_StreamInterfaceNum, /* interface #1 */
00172         0, /* alternate 0 */
00173         0, /* no endpoint */
00174         VIDStreamingInterfaceDescriptor_CLASS,
00175         VIDStreamingInterfaceDescriptor_SUBCLASS,
00176         VIDStreamingInterfaceDescriptor_PROTOCOL,
00177         0  /* No string */
00178     },
00179     /* VS Class defined descriptors */
00180     {
00181         /* VS Input Header */
00182         {
00183             sizeof(UsbVideoInputHeaderDescriptor1),
00184             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00185             VIDStreamingInterfaceDescriptor_INPUTHEADER, /* VS_INPUT_HEADER */
00186             1, /* Only 1 payload format */
00187             sizeof(UsbVideoStreamingInterfaceDescriptor),
00188             0x80 | VIDCAMD_IsoInEndpointNum, /* Endpoint address is 0x82 */
00189             0x00, /* Dynamic Format Change not supported */
00190             2, /* Terminal Link to #2 */
00191             0, /* Still Capture not supported */
00192             0, /* Trigger not supported */
00193             0, /* No trigger usage */
00194             1, /* 1 bmaControls */
00195             0  /* No bmaControls */
00196         },
00197         /* VS Format Uncompressed */
00198         {
00199             /* Payload uncompressed format */
00200             {
00201                 sizeof(USBVideoUncompressedFormatDescriptor),
00202                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00203                 VIDStreamingInterfaceDescriptor_FMT_UNCOMPRESSED, 
00204                 /* VS_FORMAT_UNCOMPRESSED */
00205                 1, /* Format index #1 */
00206                 VIDCAMD_NumFrameTypes, /* 3 frame types */
00207                 guidYUY2, /* guid YUY2 32595559-0000-0010-8000-00AA00389B71 */
00208                 FRAME_BPP, /* 16 bits per pixel */
00209                 1, /* Default frame index: #1 */
00210                 0, /* bAspectRatioX */
00211                 0, /* bAspectRatioY */
00212                 0, /* No interlace */
00213                 0  /* No copy protect restrictions */
00214             },
00215             /* Frame format 320x240 */
00216             {
00217                 sizeof(USBVideoUncompressedFrameDescriptor1),
00218                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00219                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, 
00220                 /* VS_FRAME_UNCOMPRESSED */
00221                 1, /* Frame index #1 */
00222                 0, /* Still image not supported */
00223                 VIDCAMD_FW_1, /* wWidth */
00224                 VIDCAMD_FH_1, /* wHeight */
00225                 FRAME_BITRATEC(VIDCAMD_FW_1, VIDCAMD_FH_1, 4), /* Min bitrate */
00226                 FRAME_BITRATEC(VIDCAMD_FW_1, VIDCAMD_FH_1, 4), /* Max bitrate */
00227                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_1, VIDCAMD_FH_1), 
00228                 /* maxFrameBufferSize: 320*240*2 */
00229                 FRAME_INTERVALC(4), /* Default interval: 4F/s */
00230                 1, /* 1 Interval setting */
00231                 FRAME_INTERVALC(4), /* 4F/s, 614.4KB/s */
00232             },
00233             /* Frame format 640x480 */
00234             {
00235                 sizeof(USBVideoUncompressedFrameDescriptor1),
00236                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00237                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, /* VS_FRAME_UNCOMPRESSED */
00238                 2, /* Frame index #4 */
00239                 0, /* Still image not supported */
00240                 VIDCAMD_FW_2, /* wWidth */
00241                 VIDCAMD_FH_2, /* wHeight */
00242                 FRAME_BITRATEC(VIDCAMD_FW_2, VIDCAMD_FH_2, 1), /* Min bitrate */
00243                 FRAME_BITRATEC(VIDCAMD_FW_2, VIDCAMD_FH_2, 1), /* Max bitrate */
00244                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_2, VIDCAMD_FH_2), 
00245                 /* maxFrameBufferSize: 640*480*2 */
00246                 FRAME_INTERVALC(1), /* Default interval: 1F/s */
00247                 1, /* 1 Interval setting */
00248                 FRAME_INTERVALC(1), /* 1F/s, 614.4KB/s */
00249             },
00250             /* Frame format 176x144 */
00251             {
00252                 sizeof(USBVideoUncompressedFrameDescriptor1),
00253                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00254                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, 
00255                 /* VS_FRAME_UNCOMPRESSED */
00256                 3, /* Frame index #1 */
00257                 0, /* Still image not supported */
00258                 VIDCAMD_FW_3, /* wWidth */
00259                 VIDCAMD_FH_3, /* wHeight */
00260                 FRAME_BITRATEC(VIDCAMD_FW_3, VIDCAMD_FH_3, 4), /* Min bitrate */
00261                 FRAME_BITRATEC(VIDCAMD_FW_3, VIDCAMD_FH_3, 4), /* Max bitrate */
00262                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_3, VIDCAMD_FH_3), 
00263                 /* maxFrameBufferSize: 176*144*2 = 50688 */
00264                 FRAME_INTERVALC(12), /* Default interval: 12F/s */
00265                 1, /* 1 Interval setting */
00266                 FRAME_INTERVALC(12), /* 12F/s, 608.256KB/s */
00267             },
00268             /* Color format Uncompressed */
00269             {
00270                 sizeof(USBVideoColorMatchingDescriptor),
00271                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00272                 VIDStreamingInterfaceDescriptor_COLORFORMAT, /* VS_COLORFORMAT */
00273                 1, /* BT.709, sRGB */
00274                 1, /* BT.709 */
00275                 4, /* BT.601 */
00276             }
00277         }
00278     },
00279     /* VS Interface Descriptor: 400K */
00280     {
00281         sizeof(USBInterfaceDescriptor),
00282         USBGenericDescriptor_INTERFACE,
00283         VIDCAMD_StreamInterfaceNum, /* interface #1 */
00284         1, /* alternate 1 */
00285         1, /* 1 endpoint */
00286         VIDStreamingInterfaceDescriptor_CLASS,
00287         VIDStreamingInterfaceDescriptor_SUBCLASS,
00288         VIDStreamingInterfaceDescriptor_PROTOCOL,
00289         0  /* No string */
00290     },
00291     /* ISO IN EP 6 Descriptor */
00292     {
00293         sizeof(USBEndpointDescriptor),
00294         USBGenericDescriptor_ENDPOINT,
00295         0x80 | VIDCAMD_IsoInEndpointNum, /* EP2, IN */
00296         (USBEndpointDescriptor_ISOCHRONOUS),
00297         //|USBEndpointDescriptor_Asynchronous_ISOCHRONOUS),
00298         FRAME_PACKET_SIZE_FS,
00299         1
00300     }
00301 };
00302 
00303 /**  Configuration descriptors. */
00304 const struct UsbVideoCamConfigurationDescriptors configurationDescriptorsHS =
00305 {
00306     /* Configuration descriptor */
00307     {
00308         sizeof(USBConfigurationDescriptor),
00309         USBGenericDescriptor_CONFIGURATION,
00310         sizeof(struct UsbVideoCamConfigurationDescriptors),
00311         2, /* 2 interface in this configuration */
00312         1, /* This is configuration #1 */
00313         0, /* No string descriptor for this configuration */
00314         BOARD_USB_BMATTRIBUTES,
00315         USBConfigurationDescriptor_POWER(100)
00316     },
00317     /* IAD */
00318     {
00319         sizeof(USBInterfaceAssociationDescriptor),
00320         USBGenericDescriptor_INTERFACEASSOCIATION,
00321         VIDCAMD_ControlInterfaceNum, /* Start interface is #0 */
00322         2, /* 2 interface is associated */
00323         VIDIADDescriptor_CLASS,
00324         VIDIADDescriptor_SUBCLASS,
00325         VIDIADDescriptor_PROTOCOL,
00326         0
00327     },
00328     /* VC Interface descriptor */
00329     {
00330         sizeof(USBInterfaceDescriptor),
00331         USBGenericDescriptor_INTERFACE,
00332         VIDCAMD_ControlInterfaceNum, /* This is interface #0 */
00333         0, /* This is setting #0 for interface */
00334         0,
00335         VIDControlInterfaceDescriptor_CLASS,    /* CC_VIDEO */
00336         VIDControlInterfaceDescriptor_SUBCLASS, /* SC_VIDEOCONTROL */
00337         VIDControlInterfaceDescriptor_PROTOCOL, /* PC_PROTOCOL_UNDEFINED */
00338         0, /* No string descriptor */
00339     },
00340     /* VC Class defined descriptors */
00341     {
00342         /* VC Header */
00343         {
00344             sizeof(UsbVideoControlInterfaceHeader1),
00345             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00346             VIDGenericDescriptor_HEADER,    /* VC_HEADER */
00347             VIDHeaderDescriptor_VID1_00,
00348             sizeof(UsbVideoControlInterfaceDescriptor),
00349             BOARD_MCK,
00350             1, /* 1 VideoStreaming interface */
00351             VIDCAMD_StreamInterfaceNum, /* VideoStreaming interface 1: interface #1 */
00352         },
00353         /* VC Camera Terminal */
00354         {
00355             sizeof(USBVideoCameraTerminalDescriptor),
00356             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00357             VIDGenericDescriptor_INPUTTERMINAL, /* VC_INPUT_TERMINAL */
00358             1, /* Terminal ID: #1 */
00359             VIDInputTerminalDescriptor_CAMERA, /* ITT_CAMERA */
00360             0, /* Assoc: None */
00361             0, /* No string */
00362             0, /* Optical Zoom not supported */
00363             0, /* Optical Zoom not supported */
00364             0, /* Optical Zoom not supported */
00365             3, /* 3 bytes for bmControls */
00366             {0, 0, 0}
00367         },
00368         /* VC Output Terminal */
00369         {
00370             sizeof(USBVideoOutputTerminalDescriptor),
00371             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00372             VIDGenericDescriptor_OUTPUTTERMINAL, /* VC_OUTPUT_TERMINAL */
00373             2, /* Terminal ID: #2 */
00374             VIDTerminalDescriptor_STREAMING, /* Streaming terminal */
00375             0, /* Assoc: None */
00376             1, /* Source: Terminal is connected to #1 */
00377             0  /* No string */
00378         }
00379         
00380     },
00381     /* VS Interface descriptor */
00382     {
00383         sizeof(USBInterfaceDescriptor),
00384         USBGenericDescriptor_INTERFACE,
00385         VIDCAMD_StreamInterfaceNum, /* interface #1 */
00386         0, /* alternate 0 */
00387         0, /* no endpoint */
00388         VIDStreamingInterfaceDescriptor_CLASS,
00389         VIDStreamingInterfaceDescriptor_SUBCLASS,
00390         VIDStreamingInterfaceDescriptor_PROTOCOL,
00391         0  /* No string */
00392     },
00393     /* VS Class defined descriptors */
00394     {
00395         /* VS Input Header */
00396         {
00397             sizeof(UsbVideoInputHeaderDescriptor1),
00398             VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00399             VIDStreamingInterfaceDescriptor_INPUTHEADER, /* VS_INPUT_HEADER */
00400             1, /* Only 1 payload format */
00401             sizeof(UsbVideoStreamingInterfaceDescriptor),
00402             0x80 | VIDCAMD_IsoInEndpointNum, /* Endpoint address is 0x82 */
00403             0x00, /* Dynamic Format Change not supported */
00404             2, /* Terminal Link to #2 */
00405             0, /* Still Capture not supported */
00406             0, /* Trigger not supported */
00407             0, /* No trigger usage */
00408             1, /* 1 bmaControls */
00409             0  /* No bmaControls */
00410         },
00411         /* VS Format Uncompressed */
00412         {
00413             /* Payload uncompressed format */
00414             {
00415                 sizeof(USBVideoUncompressedFormatDescriptor),
00416                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00417                 VIDStreamingInterfaceDescriptor_FMT_UNCOMPRESSED, 
00418                 /* VS_FORMAT_UNCOMPRESSED */
00419                 1, /* Format index #1 */
00420                 VIDCAMD_NumFrameTypes, /* 3 frame types */
00421                 guidYUY2, /* guid YUY2 32595559-0000-0010-8000-00AA00389B71 */
00422                 FRAME_BPP, /* 16 bits per pixel */
00423                 1, /* Default frame index: #1 */
00424                 0, /* bAspectRatioX */
00425                 0, /* bAspectRatioY */
00426                 0, /* No interlace */
00427                 0  /* No copy protect restrictions */
00428             },
00429             /* Frame format 320x240 */
00430             {
00431                 sizeof(USBVideoUncompressedFrameDescriptor1),
00432                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00433                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, 
00434                 /* VS_FRAME_UNCOMPRESSED */
00435                 1, /* Frame index #1 */
00436                 0, /* Still image not supported */
00437                 VIDCAMD_FW_1, /* wWidth */
00438                 VIDCAMD_FH_1, /* wHeight */
00439                 FRAME_BITRATEC(VIDCAMD_FW_1, VIDCAMD_FH_1, 15), /* Min bitrate */
00440                 FRAME_BITRATEC(VIDCAMD_FW_1, VIDCAMD_FH_1, 15), /* Max bitrate */
00441                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_1, VIDCAMD_FH_1), 
00442                 /* maxFrameBufferSize: 320*240*2 */
00443                 FRAME_INTERVALC(15), /* Default interval: 15F/s */
00444                 1, /* 1 Interval setting */
00445                 FRAME_INTERVALC(15), /* 15F/s, 2304KB/s */
00446             },
00447             /* Frame format 640x480 */
00448             {
00449                 sizeof(USBVideoUncompressedFrameDescriptor1),
00450                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00451                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, 
00452                 /* VS_FRAME_UNCOMPRESSED */
00453                 2, /* Frame index #4 */
00454                 0, /* Still image not supported */
00455                 VIDCAMD_FW_2, /* wWidth */
00456                 VIDCAMD_FH_2, /* wHeight */
00457                 FRAME_BITRATEC(VIDCAMD_FW_2, VIDCAMD_FH_2, 26), /* Min bitrate */
00458                 FRAME_BITRATEC(VIDCAMD_FW_2, VIDCAMD_FH_2, 26), /* Max bitrate */
00459                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_2, VIDCAMD_FH_2), 
00460                 /* maxFrameBufferSize: 640*480*2 */
00461                 FRAME_INTERVALC(26), /* Default interval: 12F/s */
00462                 1, /* 1 Interval setting */
00463                 FRAME_INTERVALC(26), /* 12F/s, 7372.8KB/s */
00464             },
00465             /* Frame format 176x144 */
00466             {
00467                 sizeof(USBVideoUncompressedFrameDescriptor1),
00468                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00469                 VIDStreamingInterfaceDescriptor_FRM_UNCOMPRESSED, 
00470                 /* VS_FRAME_UNCOMPRESSED */
00471                 3, /* Frame index #1 */
00472                 0, /* Still image not supported */
00473                 VIDCAMD_FW_3, /* wWidth */
00474                 VIDCAMD_FH_3, /* wHeight */
00475                 FRAME_BITRATEC(VIDCAMD_FW_3, VIDCAMD_FH_3, 30), /* Min bitrate */
00476                 FRAME_BITRATEC(VIDCAMD_FW_3, VIDCAMD_FH_3, 30), /* Max bitrate */
00477                 FRAME_BUFFER_SIZEC(VIDCAMD_FW_3, VIDCAMD_FH_3), 
00478                 /* maxFrameBufferSize: 176*144*2 = 50680 */
00479                 FRAME_INTERVALC(30), /* Default interval: 30F/s */
00480                 1, /* 1 Interval setting */
00481                 FRAME_INTERVALC(30), /* 30F/s, 1520.4KB/s */
00482             },
00483             /* Color format Uncompressed */
00484             {
00485                 sizeof(USBVideoColorMatchingDescriptor),
00486                 VIDGenericDescriptor_INTERFACE, /* CS_INTERFACE */
00487                 VIDStreamingInterfaceDescriptor_COLORFORMAT, /* VS_COLORFORMAT */
00488                 1, /* BT.709, sRGB */
00489                 1, /* BT.709 */
00490                 4, /* BT.601 */
00491             }
00492         }
00493     },
00494     /* VS Interface Descriptor: 400K */
00495     {
00496         sizeof(USBInterfaceDescriptor),
00497         USBGenericDescriptor_INTERFACE,
00498         VIDCAMD_StreamInterfaceNum, /* interface #1 */
00499         1, /* alternate 1 */
00500         1, /* 1 endpoint */
00501         VIDStreamingInterfaceDescriptor_CLASS,
00502         VIDStreamingInterfaceDescriptor_SUBCLASS,
00503         VIDStreamingInterfaceDescriptor_PROTOCOL,
00504         0  /* No string */
00505     },
00506     /* ISO IN EP 6 Descriptor */
00507     {
00508         sizeof(USBEndpointDescriptor),
00509         USBGenericDescriptor_ENDPOINT,
00510         0x80 | VIDCAMD_IsoInEndpointNum, /* EP2, IN */
00511         (USBEndpointDescriptor_ISOCHRONOUS ),
00512         //|USBEndpointDescriptor_Asynchronous_ISOCHRONOUS),
00513         VIDCAMD_EpDesc_MaxPacketSize,
00514         2
00515     }
00516 };
00517 
00518 /**  List of descriptors used by the device. */
00519 
00520 const USBDDriverDescriptors usbdDriverDescriptors =
00521 {
00522     &usbDeviceDescriptor,
00523     (const USBConfigurationDescriptor *) &configurationDescriptorsFS,
00524     &qualifierDescriptor,
00525     0, // No full-speed other speed configuration descriptor
00526     0, // No high-speed device descriptor (Uses FS one)
00527     (const USBConfigurationDescriptor *) &configurationDescriptorsHS,
00528     &qualifierDescriptor,
00529     0, // No high-speed other speed configuration descriptor
00530     0, // No string descriptor
00531     0  // No string descriptor
00532 };
00533 
00534 /**@}*/
00535 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines