0
|
1 |
// Copyright (c) 1997-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 |
// e32test/usb/t_usb_device/include/t_usbdev_config.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef __CONFIG_H__
|
|
19 |
#define __CONFIG_H__
|
|
20 |
|
|
21 |
enum XMLState
|
|
22 |
{
|
|
23 |
EEmpty,
|
|
24 |
EStartKey,
|
|
25 |
EEndKey,
|
|
26 |
EAttribute,
|
|
27 |
EValue
|
|
28 |
};
|
|
29 |
|
|
30 |
struct IFConfig
|
|
31 |
{
|
|
32 |
struct IFConfig * iPtrNext;
|
|
33 |
#ifdef USB_SC
|
|
34 |
TUsbcScInterfaceInfo* iInfoPtr;
|
|
35 |
#else
|
|
36 |
TUsbcInterfaceInfo* iInfoPtr;
|
|
37 |
#endif
|
|
38 |
TBool iAlternateSetting;
|
|
39 |
TBool iEpDMA[KMaxEndpointsPerClient];
|
|
40 |
TBool iEpDoubleBuff[KMaxEndpointsPerClient];
|
|
41 |
TUint8 iNumber;
|
|
42 |
TUint32 iBandwidthIn;
|
|
43 |
TUint32 iBandwidthOut;
|
|
44 |
TUint8 iPortNumber;
|
|
45 |
IFConfig (TUint8 aNumber);
|
|
46 |
};
|
|
47 |
typedef struct IFConfig IFConfigType;
|
|
48 |
typedef IFConfigType* IFConfigPtr;
|
|
49 |
|
|
50 |
|
|
51 |
struct LDDConfig
|
|
52 |
{
|
|
53 |
struct LDDConfig * iPtrNext;
|
|
54 |
IFConfigPtr iIFPtr;
|
|
55 |
TBuf<50> iName;
|
|
56 |
TBool iSoftConnect;
|
|
57 |
TBool iSelfPower;
|
|
58 |
TBool iRemoteWakeup;
|
|
59 |
TBool iHighSpeed;
|
|
60 |
TBool iEPStall;
|
|
61 |
TUint8 iNumEndpoints;
|
|
62 |
TUint8 iNumChannels;
|
|
63 |
TUint8 iFeatures;
|
|
64 |
TUint8 iMaxPower;
|
|
65 |
TUint16 iSpec;
|
|
66 |
TUint16 iVid;
|
|
67 |
TUint16 iPid;
|
|
68 |
TUint16 iRelease;
|
|
69 |
TBool iOtg_A;
|
|
70 |
TBool iOtg_altA;
|
|
71 |
TBool iOtg_altB;
|
|
72 |
TDesC16 * iManufacturer;
|
|
73 |
TDesC16 * iProduct;
|
|
74 |
TDesC16 * iSerialNumber;
|
|
75 |
LDDConfig (TPtrC aName);
|
|
76 |
};
|
|
77 |
typedef struct LDDConfig LDDConfigType;
|
|
78 |
typedef LDDConfigType* LDDConfigPtr;
|
|
79 |
|
|
80 |
struct ConfigPtrs
|
|
81 |
{
|
|
82 |
LDDConfigPtr* iNextLDDPtrPtr;
|
|
83 |
LDDConfigPtr iThisLDDPtr;
|
|
84 |
IFConfigPtr iThisIFPtr;
|
|
85 |
IFConfigPtr* iNextIFPtrPtr;
|
|
86 |
ConfigPtrs (LDDConfigPtr* LDDPtrPtr);
|
|
87 |
};
|
|
88 |
typedef struct ConfigPtrs ConfigPtrsType;
|
|
89 |
typedef ConfigPtrsType* ConfigPtrsPtr;
|
|
90 |
|
|
91 |
bool ProcessConfigFile (RFile aConfigFile,CConsoleBase* iConsole, LDDConfigPtr * LDDPtrPtr);
|
|
92 |
TBool CheckAttribute (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes);
|
|
93 |
TBool CheckValue (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes);
|
|
94 |
TInt CheckXmlKey (TPtrC aKey, TInt aLevel);
|
|
95 |
TBool TDesToTUint (TPtrC aDes, TUint * aValue);
|
|
96 |
TBool TDesToBool (TPtrC aDes, TBool * aValue);
|
|
97 |
|
|
98 |
#endif // __CONFIG_H__
|