author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 02 Sep 2010 21:54:16 +0300 | |
changeset 259 | 57b9594f5772 |
parent 0 | a41df078684a |
child 257 | 3e88ff8f41d5 |
permissions | -rw-r--r-- |
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1 |
// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 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 PBASE-T_USBDI-0484.cpp |
|
15 |
// @internalComponent |
|
16 |
// |
|
17 |
// |
|
18 |
||
19 |
#include "PBASE-T_USBDI-0484.h" |
|
20 |
#include "testpolicy.h" |
|
21 |
#include "modelleddevices.h" |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
22 |
#include "OstTraceDefinitions.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
23 |
#ifdef OST_TRACE_COMPILER_IN_USE |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
24 |
#include "PBASE-T_USBDI-0484Traces.h" |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
25 |
#endif |
0 | 26 |
|
27 |
||
28 |
||
29 |
||
30 |
namespace NUnitTesting_USBDI |
|
31 |
{ |
|
32 |
_LIT8(KDataPayload1,"opqrstuvwxyzabcdefghijklmnopqrstuvwxyz12345abcdefghijklmnopqrstuvwxyz"); |
|
33 |
_LIT8(KDataPayload2,"12345opqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); |
|
34 |
_LIT8(KDataPayload3,"abcdefghijklmnopqrstuvwxyzopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); // 64bytes |
|
35 |
||
36 |
const TInt KBulkTransferId1 = 0x01; |
|
37 |
const TInt KBulkTransferId2 = 0x02; |
|
38 |
const TInt KBulkTransferId3 = 0x03; |
|
39 |
_LIT(KTestCaseId,"PBASE-T_USBDI-0484"); |
|
40 |
const TFunctorTestCase<CUT_PBASE_T_USBDI_0484,TBool> CUT_PBASE_T_USBDI_0484::iFunctor(KTestCaseId); |
|
41 |
||
42 |
CUT_PBASE_T_USBDI_0484* CUT_PBASE_T_USBDI_0484::NewL(TBool aHostRole) |
|
43 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
44 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0484_NEWL_ENTRY, aHostRole ); |
0 | 45 |
CUT_PBASE_T_USBDI_0484* self = new (ELeave) CUT_PBASE_T_USBDI_0484(aHostRole); |
46 |
CleanupStack::PushL(self); |
|
47 |
self->ConstructL(); |
|
48 |
CleanupStack::Pop(self); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
49 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_NEWL_EXIT, ( TUint )( self ) ); |
0 | 50 |
return self; |
51 |
} |
|
52 |
||
53 |
||
54 |
CUT_PBASE_T_USBDI_0484::CUT_PBASE_T_USBDI_0484(TBool aHostRole) |
|
55 |
: CBaseBulkTestCase(KTestCaseId,aHostRole), |
|
56 |
iCaseStep(EInProgress) |
|
57 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
58 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0484_CUT_PBASE_T_USBDI_0484_ENTRY, this ); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
59 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_CUT_PBASE_T_USBDI_0484_EXIT, this ); |
0 | 60 |
} |
61 |
||
62 |
||
63 |
void CUT_PBASE_T_USBDI_0484::ConstructL() |
|
64 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
65 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0484_CONSTRUCTL_ENTRY, this ); |
0 | 66 |
BaseBulkConstructL(); |
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_CONSTRUCTL_EXIT, this ); |
0 | 68 |
} |
69 |
||
70 |
||
71 |
CUT_PBASE_T_USBDI_0484::~CUT_PBASE_T_USBDI_0484() |
|
72 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
OstTraceFunctionEntry1( CUT_PBASE_T_USBDI_0484_CUT_PBASE_T_USBDI_0484_ENTRY_DUP01, this ); |
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
74 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_CUT_PBASE_T_USBDI_0484_EXIT_DUP01, this ); |
0 | 75 |
} |
76 |
||
77 |
void CUT_PBASE_T_USBDI_0484::Ep0TransferCompleteL(TInt aCompletionCode) |
|
78 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
79 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0484_EP0TRANSFERCOMPLETEL_ENTRY, this ); |
0 | 80 |
Cancel(); |
81 |
||
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
82 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_EP0TRANSFERCOMPLETEL, "Ep0TransferCompleteL with aCompletionCode = %d",aCompletionCode); |
0 | 83 |
|
84 |
if(aCompletionCode != KErrNone) |
|
85 |
{ |
|
86 |
TBuf<256> msg; |
|
87 |
msg.Format(_L("<Error %d> Transfer to control endpoint 0 was not successful"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
88 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_EP0TRANSFERCOMPLETEL_DUP01, msg); |
0 | 89 |
} |
90 |
||
91 |
if(iCaseStep == EPassed) |
|
92 |
{ |
|
93 |
if(aCompletionCode == KErrNone) |
|
94 |
{ |
|
95 |
return TestPassed(); |
|
96 |
} |
|
97 |
// else error |
|
98 |
iCaseStep = EFailed; |
|
99 |
} |
|
100 |
||
101 |
if(iCaseStep == EFailed) |
|
102 |
{ |
|
103 |
return TestFailed(KErrCompletion); |
|
104 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
105 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_EP0TRANSFERCOMPLETEL_EXIT, this ); |
0 | 106 |
} |
107 |
||
108 |
||
109 |
void CUT_PBASE_T_USBDI_0484::TransferCompleteL(TInt aTransferId,TInt aCompletionCode) |
|
110 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
111 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_ENTRY, this ); |
0 | 112 |
Cancel(); |
113 |
TInt err(KErrNone); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
114 |
OstTraceExt2(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL, "Transfer completed (id=%d), aCompletionCode = %d",aTransferId, aCompletionCode); |
0 | 115 |
|
116 |
if(aTransferId == KBulkTransferId1) |
|
117 |
{ |
|
118 |
if(iCaseStep == EStalled) |
|
119 |
{ |
|
120 |
if(aCompletionCode != KErrUsbStalled) |
|
121 |
{ |
|
122 |
TBuf<256> msg; |
|
123 |
msg.Format(_L("<Error %d> The transfer completed with no errors but should have stalled"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP01, msg); |
0 | 125 |
TTestCaseFailed request(KErrCorrupt,msg); |
126 |
return iControlEp0->SendRequest(request,this); |
|
127 |
} |
|
128 |
else |
|
129 |
{ |
|
130 |
// Acknowledge the stall and clear |
|
131 |
err = iTestPipeInterface1BulkIn.ClearRemoteStall(); |
|
132 |
if(err != KErrNone) |
|
133 |
{ |
|
134 |
TBuf<256> msg; |
|
135 |
msg.Format(_L("<Error %d> The remote stall cannot be cleared"),err); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
136 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP02, msg); |
0 | 137 |
iCaseStep = EFailed; |
138 |
TTestCaseFailed request(err,msg); |
|
139 |
return iControlEp0->SendRequest(request,this); |
|
140 |
} |
|
141 |
||
142 |
// try to get data now, after EP has been stalled |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
143 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP03, "try to get data now, after EP has been stalled"); |
0 | 144 |
iInTransfer[0]->TransferIn(KDataPayload1().Length()); |
145 |
iInTransfer[1]->TransferIn(KDataPayload2().Length()); |
|
146 |
iInTransfer[2]->TransferIn(KDataPayload3().Length()); |
|
147 |
||
148 |
iCaseStep = ETransferAfterStall; |
|
149 |
TEndpointWriteRequest request(1,1,KDataPayload1);// EP1 because 1st writter EP |
|
150 |
iControlEp0->SendRequest(request,this); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
151 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_EXIT, this ); |
0 | 152 |
return; |
153 |
} |
|
154 |
} |
|
155 |
if(iCaseStep == ETransferAfterStall) |
|
156 |
{ |
|
157 |
if(aCompletionCode != KErrNone) |
|
158 |
{ |
|
159 |
TBuf<256> msg; |
|
160 |
msg.Format(_L("<Error %d> No data got after EP2 being stalled"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
161 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP04, msg); |
0 | 162 |
iCaseStep = EFailed; |
163 |
TTestCaseFailed request(err,msg); |
|
164 |
return iControlEp0->SendRequest(request,this); |
|
165 |
} |
|
166 |
||
167 |
// else ok, compare data rcvd now |
|
168 |
TPtrC8 data(iInTransfer[0]->DataPolled()); |
|
169 |
// Compare the data to what is expected |
|
170 |
if(data.Compare(KDataPayload1) != 0) |
|
171 |
{ |
|
172 |
TBuf<256> msg; |
|
173 |
msg.Format(_L("<Error %d> Interrupt data received does not match data sent"),KErrCompletion); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
174 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP05, msg); |
0 | 175 |
iCaseStep = EFailed; |
176 |
TTestCaseFailed request(KErrCompletion,msg); |
|
177 |
return iControlEp0->SendRequest(request,this); |
|
178 |
} |
|
179 |
// Comparison is a match, wait for next transfer |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
180 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP06, "Comparison is a match, wait for transfer 2"); |
0 | 181 |
User::After(500000); |
182 |
TEndpointWriteRequest request(1,1,KDataPayload2);// EP1 because 1st writter EP |
|
183 |
iControlEp0->SendRequest(request,this); |
|
184 |
} |
|
185 |
} |
|
186 |
else if(aTransferId == KBulkTransferId2) |
|
187 |
{ |
|
188 |
if(aCompletionCode != KErrNone) |
|
189 |
{ |
|
190 |
TBuf<256> msg; |
|
191 |
msg.Format(_L("<Error %d> No data got after EP2 being stalled"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
192 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP07, msg); |
0 | 193 |
iCaseStep = EFailed; |
194 |
TTestCaseFailed request(err,msg); |
|
195 |
return iControlEp0->SendRequest(request,this); |
|
196 |
} |
|
197 |
||
198 |
// else ok, compare data rcvd now |
|
199 |
TPtrC8 data(iInTransfer[1]->DataPolled()); |
|
200 |
// Compare the data to what is expected |
|
201 |
if(data.Compare(KDataPayload2) != 0) |
|
202 |
{ |
|
203 |
TBuf<256> msg; |
|
204 |
msg.Format(_L("<Error %d> Interrupt data received does not match data sent"),KErrCompletion); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
205 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP08, msg); |
0 | 206 |
iCaseStep = EFailed; |
207 |
TTestCaseFailed request(KErrCompletion,msg); |
|
208 |
return iControlEp0->SendRequest(request,this); |
|
209 |
} |
|
210 |
// Comparison is a match, wait for next transfer |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
211 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP09, "Comparison is a match, wait for transfer 3"); |
0 | 212 |
User::After(500000); |
213 |
TEndpointWriteRequest request(1,1,KDataPayload3);// EP1 because 1st writter EP |
|
214 |
iControlEp0->SendRequest(request,this); |
|
215 |
} |
|
216 |
else if(aTransferId == KBulkTransferId3) |
|
217 |
{ |
|
218 |
if(aCompletionCode != KErrNone) |
|
219 |
{ |
|
220 |
TBuf<256> msg; |
|
221 |
msg.Format(_L("<Error %d> No data got after EP2 being stalled"),aCompletionCode); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
222 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP10, msg); |
0 | 223 |
iCaseStep = EFailed; |
224 |
TTestCaseFailed request(err,msg); |
|
225 |
return iControlEp0->SendRequest(request,this); |
|
226 |
} |
|
227 |
// else ok, compare data rcvd now |
|
228 |
TPtrC8 data(iInTransfer[2]->DataPolled()); |
|
229 |
// Compare the data to what is expected |
|
230 |
if(data.Compare(KDataPayload3) != 0) |
|
231 |
{ |
|
232 |
TBuf<256> msg; |
|
233 |
msg.Format(_L("<Error %d> Interrupt data received does not match data sent"),KErrCompletion); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
234 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP11, msg); |
0 | 235 |
iCaseStep = EFailed; |
236 |
TTestCaseFailed request(KErrCompletion,msg); |
|
237 |
return iControlEp0->SendRequest(request,this); |
|
238 |
} |
|
239 |
// Comparison is a match, test passes |
|
240 |
iCaseStep = EPassed; |
|
241 |
TTestCasePassed request; |
|
242 |
return iControlEp0->SendRequest(request,this); |
|
243 |
} |
|
244 |
else |
|
245 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
246 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_DUP12, "<Error> a transfer completed (id=%d) that was not expected",aTransferId); |
0 | 247 |
return TestFailed(KErrCorrupt); |
248 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
249 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_TRANSFERCOMPLETEL_EXIT_DUP01, this ); |
0 | 250 |
} |
251 |
||
252 |
||
253 |
void CUT_PBASE_T_USBDI_0484::DeviceInsertedL(TUint aDeviceHandle) |
|
254 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
255 |
OstTraceFunctionEntryExt( CUT_PBASE_T_USBDI_0484_DEVICEINSERTEDL_ENTRY, this ); |
0 | 256 |
|
257 |
Cancel(); |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
258 |
OstTrace1(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_DEVICEINSERTEDL, "this - %08x", this); |
0 | 259 |
|
260 |
TBuf<256> msg; |
|
261 |
TInt err = KErrNone; |
|
262 |
if(BaseBulkDeviceInsertedL(aDeviceHandle, EFalse) == EDeviceConfigurationError) |
|
263 |
// Prepare for response from control transfer to client |
|
264 |
{ |
|
265 |
err = KErrGeneral; |
|
266 |
msg.Format(_L("Base class DeviceInsertedL failed")); |
|
267 |
} |
|
268 |
else |
|
269 |
{ |
|
270 |
// Create the bulk transfers |
|
271 |
iInTransfer[0] = new (ELeave) CBulkTransfer(iTestPipeInterface1BulkIn,iUsbInterface1,256,*this,KBulkTransferId1); |
|
272 |
iInTransfer[1] = new (ELeave) CBulkTransfer(iTestPipeInterface1BulkIn,iUsbInterface1,256,*this,KBulkTransferId2); |
|
273 |
iInTransfer[2] = new (ELeave) CBulkTransfer(iTestPipeInterface1BulkIn,iUsbInterface1,256,*this,KBulkTransferId3); |
|
274 |
||
275 |
// Initialise the descriptors for transfer |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
276 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_DEVICEINSERTEDL_DUP01, "Initialising the transfer descriptors - interface 1"); |
0 | 277 |
err = iUsbInterface1.InitialiseTransferDescriptors(); |
278 |
if(err != KErrNone) |
|
279 |
{ |
|
280 |
_LIT(lit, "<Error %d> Unable to initialise transfer descriptors"); |
|
281 |
msg.Format(lit,err); |
|
282 |
} |
|
283 |
} |
|
284 |
if(err != KErrNone) |
|
285 |
{ |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
286 |
OstTrace0(TRACE_NORMAL, CUT_PBASE_T_USBDI_0484_DEVICEINSERTEDL_DUP02, msg); |
0 | 287 |
iCaseStep = EFailed; |
288 |
TTestCaseFailed request(err,msg); |
|
289 |
iControlEp0->SendRequest(request,this); |
|
290 |
} |
|
291 |
else |
|
292 |
{ |
|
293 |
iCaseStep = EStalled; |
|
294 |
iInTransfer[0]->TransferIn(KDataPayload1().Length()); |
|
295 |
||
296 |
TStallEndpointRequest r2(2,1); // Stall endpoint 2 interface 1 |
|
297 |
iControlEp0->SendRequest(r2,this); |
|
298 |
} |
|
259
57b9594f5772
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
299 |
OstTraceFunctionExit1( CUT_PBASE_T_USBDI_0484_DEVICEINSERTEDL_EXIT, this ); |
0 | 300 |
} |
301 |
||
302 |
} |