mtptransports/mtpusbtransport/usbsic_imp/inc/mtpusbtransportconstants.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef MTPUSBTRANSPORTCONSTANTS_H
       
    22 #define MTPUSBTRANSPORTCONSTANTS_H
       
    23 
       
    24 #include <d32usbc.h>
       
    25 #include <e32def.h>
       
    26 
       
    27 /**
       
    28 The USB MTP device class alternate interface number.
       
    29 */
       
    30 const TUint KMTPUsbAlternateInterface(0);
       
    31 
       
    32 /**
       
    33 * Endpoint address index of Endpoint descriptor
       
    34 */
       
    35 const TUint KEpAddressOffsetInEpDesc(2);
       
    36 
       
    37 /**
       
    38 The USB MTP device class USB client controller number.
       
    39 */
       
    40 const TUint KDefaultUsbClientController(0);
       
    41 
       
    42 
       
    43 /**
       
    44 The Full Speed USB MaxPacketsize for different Endpoints.
       
    45 */
       
    46 const TUint KMaxPacketTypeControlFS(16);
       
    47 const TUint KMaxPacketTypeBulkFS(64);
       
    48 
       
    49 /**
       
    50 The High Speed USB MaxPacketSize for different Endpoints.
       
    51 */
       
    52 const TUint KMaxPacketTypeControlHS(64);
       
    53 const TUint KMaxPacketTypeBulkHS(512);
       
    54 
       
    55 /*
       
    56  * USB MaxPacketSize for interrupt Endpoint.
       
    57  */
       
    58 const TUint KMaxPacketTypeInterrupt(64);
       
    59 
       
    60 /**
       
    61 The minimum number of endpoints required to support the USM MTP device class, 
       
    62 as specified in the "Universal Serial Bus Still Image Capture Device 
       
    63 Definition" specification. This value excludes the control, endpoint.
       
    64 */
       
    65 const TUint KMTPUsbRequiredNumEndpoints(3);
       
    66 
       
    67 /**
       
    68 USB MTP device class logical endpoint bit position bits.
       
    69 */
       
    70 const TUint KMTPUsbControlEpBit(KUsbcEndpoint0Bit);
       
    71 const TUint KMTPUsbBulkInEpBit(KUsbcEndpoint1Bit);
       
    72 const TUint KMTPUsbBulkOutEpBit(KUsbcEndpoint2Bit);
       
    73 const TUint KMTPUsbInterruptEpBit(KUsbcEndpoint3Bit);
       
    74 
       
    75 /**
       
    76 USB MTP device class endpoint direction flag bits.
       
    77 */
       
    78 const TUint KMTPUsbControlEpDir(KUsbEpDirBidirect);
       
    79 const TUint KMTPUsbBulkInEpDir(KUsbEpDirIn);
       
    80 const TUint KMTPUsbBulkOutEpDir(KUsbEpDirOut);
       
    81 const TUint KMTPUsbInterruptEpDir(KUsbEpDirIn);
       
    82 
       
    83 /**
       
    84 USB MTP device class logical endpoint numbers.
       
    85 */
       
    86 const TEndpointNumber KMTPUsbControlEp(EEndpoint0);
       
    87 const TEndpointNumber KMTPUsbBulkInEp(EEndpoint1);
       
    88 const TEndpointNumber KMTPUsbBulkOutEp(EEndpoint2);
       
    89 const TEndpointNumber KMTPUsbInterruptEp(EEndpoint3);
       
    90 
       
    91 /**
       
    92 USB MTP device class logical endpoint polling intervals (Ms).
       
    93 */
       
    94 const TUint KMTPUsbControlEpPoll(0);
       
    95 const TUint KMTPUsbBulkInEpPoll(0);
       
    96 const TUint KMTPUsbBulkOutEpPoll(0);
       
    97 const TUint KMTPUsbInterruptEpPoll(5);
       
    98 
       
    99 /**
       
   100 USB MTP high speed NAK rates.
       
   101 */
       
   102 const TUint KMTPUsbControlEpNAKRate(1);
       
   103 const TUint KMTPUsbBulkInEpNAKRate(1);
       
   104 const TUint KMTPUsbBulkOutEpNAKRate(1);
       
   105 const TUint KMTPUsbInterruptEpNAKRate(1);
       
   106 
       
   107 /**
       
   108 USB MTP device class endpoint type flag bits.
       
   109 */
       
   110 const TUint KMTPUsbControlEpType(KUsbEpTypeControl);
       
   111 const TUint KMTPUsbBulkInEpType(KUsbEpTypeBulk);
       
   112 const TUint KMTPUsbBulkOutEpType(KUsbEpTypeBulk);
       
   113 const TUint KMTPUsbInterruptEpType(KUsbEpTypeInterrupt);
       
   114 
       
   115 /**
       
   116 USM MTP device class internal endpoint identifiers.
       
   117 */
       
   118 enum TMTPUsbEndpointId
       
   119     {
       
   120     EMTPUsbEpControl,
       
   121     EMTPUsbEpBulkIn,
       
   122     EMTPUsbEpBulkOut,
       
   123     EMTPUsbEpInterrupt,
       
   124     EMTPUsbEpNumEndpoints,
       
   125     };
       
   126 
       
   127 #endif // MTPUSBTRANSPORTCONSTANTS_H