os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/src/UsbDescriptorOffsets.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-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 the License "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 // @file usbdescriptoroffsets.cpp
    15 // @internalComponent
    16 // 
    17 //
    18 
    19 #include "UsbDescriptorOffsets.h"
    20 
    21 
    22 namespace NUnitTesting_USBDI
    23 	{
    24 
    25 // USB Device Descriptor
    26 
    27 const TInt KDevDescOffset_bcdUSB(2);
    28 const TInt KDevDescOffset_bDeviceClass(4);
    29 const TInt KDevDescOffset_bDeviceSubClass(5);
    30 const TInt KDevDescOffset_bDeviceProtocol(6);
    31 const TInt KDevDescOffset_bMaxPacketSize(7); // For Ep0
    32 const TInt KDevDescOffset_idVendor(8);
    33 const TInt KDevDescOffset_idProduct(10);
    34 const TInt KDevDescOffset_bcdDevice(12);
    35 const TInt KDevDescOffset_iManufacturer(14);
    36 const TInt KDevDescOffset_iProduct(15);
    37 const TInt KDevDescOffset_iSerialNumber(16);
    38 const TInt KDevDescOffset_bNumConfigurations(17);
    39 
    40 // USB Configuration Descriptor
    41 
    42 const TInt KConfDescOffset_bNumInterfaces(4);
    43 const TInt KConfDescOffset_bConfigurationValue(5);
    44 const TInt KConfDescOffset_iConfiguration(6);
    45 const TInt KConfDescOffset_bMaxPower(8);
    46 
    47 // USB Interface Descriptor
    48 
    49 const TInt KIntDescOffset_bInterfaceNumber(2);
    50 const TInt KIntDescOffset_bAlternateSetting(3);
    51 const TInt KIntDescOffset_bNumEndpoints(4);	
    52 const TInt KIntDescOffset_iInterface(8);
    53 
    54 // USB String Descriptor 0
    55 
    56 const TInt KStrDescZeroOffset_bLength(0);
    57 const TInt KStrDescZeroOffset_bDescriptorType(1);
    58 const TInt KStrDescZeroOffset_wLANGID0(2);
    59 
    60 // USB String Descriptor
    61 
    62 const TInt KStrDescOffset_bLength(0);
    63 const TInt KStrDescOffset_bDescriptorType(1);
    64 const TInt KStrDescOffset_bString(2);
    65 
    66 	}