os/kernelhwsrv/kerneltest/e32test/usb/t_usb_device/include/config.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32test/usb/t_usb_device/include/t_usbdev_config.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef __CONFIG_H__
sl@0
    19
#define __CONFIG_H__
sl@0
    20
sl@0
    21
enum XMLState
sl@0
    22
	{
sl@0
    23
	EEmpty,
sl@0
    24
	EStartKey,
sl@0
    25
	EEndKey,
sl@0
    26
	EAttribute,
sl@0
    27
	EValue
sl@0
    28
	};
sl@0
    29
sl@0
    30
struct IFConfig
sl@0
    31
	{
sl@0
    32
	struct IFConfig * iPtrNext;
sl@0
    33
	#ifdef USB_SC
sl@0
    34
	TUsbcScInterfaceInfo* iInfoPtr;
sl@0
    35
	#else
sl@0
    36
	TUsbcInterfaceInfo* iInfoPtr;
sl@0
    37
	#endif
sl@0
    38
	TBool iAlternateSetting;
sl@0
    39
	TBool iEpDMA[KMaxEndpointsPerClient];
sl@0
    40
	TBool iEpDoubleBuff[KMaxEndpointsPerClient];
sl@0
    41
	TUint8 iNumber;
sl@0
    42
	TUint32 iBandwidthIn;
sl@0
    43
	TUint32 iBandwidthOut;
sl@0
    44
	TUint8 iPortNumber;
sl@0
    45
	IFConfig (TUint8 aNumber);
sl@0
    46
	};
sl@0
    47
typedef struct IFConfig IFConfigType;
sl@0
    48
typedef IFConfigType* IFConfigPtr;
sl@0
    49
sl@0
    50
	
sl@0
    51
struct LDDConfig
sl@0
    52
	{
sl@0
    53
	struct LDDConfig * iPtrNext;
sl@0
    54
	IFConfigPtr iIFPtr;
sl@0
    55
	TBuf<50> iName;
sl@0
    56
	TBool iSoftConnect;
sl@0
    57
	TBool iSelfPower;
sl@0
    58
	TBool iRemoteWakeup;
sl@0
    59
	TBool iHighSpeed;
sl@0
    60
	TBool iEPStall;
sl@0
    61
	TUint8 iNumEndpoints;
sl@0
    62
	TUint8 iNumChannels;
sl@0
    63
	TUint8 iFeatures;
sl@0
    64
	TUint8 iMaxPower;
sl@0
    65
	TUint16 iSpec;
sl@0
    66
	TUint16 iVid;
sl@0
    67
	TUint16 iPid;
sl@0
    68
	TUint16 iRelease;
sl@0
    69
	TBool iOtg_A;
sl@0
    70
	TBool iOtg_altA;
sl@0
    71
	TBool iOtg_altB;
sl@0
    72
	TDesC16 * iManufacturer;
sl@0
    73
	TDesC16 * iProduct;
sl@0
    74
	TDesC16 * iSerialNumber;
sl@0
    75
	LDDConfig (TPtrC aName);
sl@0
    76
	};
sl@0
    77
typedef struct LDDConfig LDDConfigType;
sl@0
    78
typedef LDDConfigType* LDDConfigPtr;
sl@0
    79
sl@0
    80
struct ConfigPtrs
sl@0
    81
	{
sl@0
    82
	LDDConfigPtr* iNextLDDPtrPtr;
sl@0
    83
	LDDConfigPtr iThisLDDPtr;
sl@0
    84
	IFConfigPtr iThisIFPtr;
sl@0
    85
	IFConfigPtr* iNextIFPtrPtr;
sl@0
    86
	ConfigPtrs (LDDConfigPtr* LDDPtrPtr);
sl@0
    87
	};
sl@0
    88
typedef struct ConfigPtrs ConfigPtrsType;
sl@0
    89
typedef ConfigPtrsType* ConfigPtrsPtr;
sl@0
    90
	
sl@0
    91
bool ProcessConfigFile (RFile aConfigFile,CConsoleBase* iConsole, LDDConfigPtr * LDDPtrPtr);
sl@0
    92
TBool CheckAttribute (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes);
sl@0
    93
TBool CheckValue (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes);
sl@0
    94
TInt CheckXmlKey (TPtrC aKey, TInt aLevel);
sl@0
    95
TBool TDesToTUint (TPtrC aDes, TUint * aValue);
sl@0
    96
TBool TDesToBool (TPtrC aDes, TBool * aValue);
sl@0
    97
sl@0
    98
#endif	// __CONFIG_H__