equal
deleted
inserted
replaced
157 } |
157 } |
158 |
158 |
159 #endif |
159 #endif |
160 |
160 |
161 |
161 |
|
162 #ifndef DMA_APIV2 |
162 static TInt FragmentCount(DDmaRequest* aRequest) |
163 static TInt FragmentCount(DDmaRequest* aRequest) |
163 { |
164 { |
164 TInt count = 0; |
165 TInt count = 0; |
165 for (SDmaDesHdr* pH = aRequest->iFirstHdr; pH != NULL; pH = pH->iNext) |
166 for (SDmaDesHdr* pH = aRequest->iFirstHdr; pH != NULL; pH = pH->iNext) |
166 count++; |
167 count++; |
167 return count; |
168 return count; |
168 } |
169 } |
|
170 #endif |
169 |
171 |
170 |
172 |
171 ////////////////////////////////////////////////////////////////////////////// |
173 ////////////////////////////////////////////////////////////////////////////// |
172 |
174 |
173 class DDmaTestChannel : public DLogicalChannelBase |
175 class DDmaTestChannel : public DLogicalChannelBase |
256 info.iDfcPriority = 3; |
258 info.iDfcPriority = 3; |
257 info.iDesCount = infoBuf().U.iOpen.iDesCount; |
259 info.iDesCount = infoBuf().U.iOpen.iDesCount; |
258 r = TDmaChannel::Open(info, iChannel); |
260 r = TDmaChannel::Open(info, iChannel); |
259 if (r!= KErrNone) |
261 if (r!= KErrNone) |
260 return r; |
262 return r; |
|
263 |
|
264 // ---> Code coverage of rarely called functions |
|
265 const TDmac* const c = iChannel->Controller(); |
|
266 if (!c) |
|
267 return KErrGeneral; |
|
268 const TInt mts = iChannel->MaxTransferSize(0, iCookie); |
|
269 if (mts == 0) |
|
270 return KErrGeneral; |
|
271 const TUint mam = iChannel->MemAlignMask(0, iCookie); |
|
272 if (~mam == 0) |
|
273 return KErrGeneral; |
|
274 // <--- Code coverage of rarely called functions |
|
275 |
261 iClient = &Kern::CurrentThread(); |
276 iClient = &Kern::CurrentThread(); |
262 for (TInt i=0; i<KMaxRequests; ++i) |
277 for (TInt i=0; i<KMaxRequests; ++i) |
263 { |
278 { |
264 r = Kern::CreateClientRequest(iClientRequests[i]); |
279 r = Kern::CreateClientRequest(iClientRequests[i]); |
265 if (r!=KErrNone) |
280 if (r!=KErrNone) |
386 return iChannel->FailNext((TInt)a1); |
401 return iChannel->FailNext((TInt)a1); |
387 case RTestDma::EFragmentCount: |
402 case RTestDma::EFragmentCount: |
388 { |
403 { |
389 TInt reqIdx = (TInt)a1; |
404 TInt reqIdx = (TInt)a1; |
390 __ASSERT_DEBUG(0 <= reqIdx && reqIdx < KMaxRequests, Kern::PanicCurrentThread(KClientPanicCat, __LINE__)); |
405 __ASSERT_DEBUG(0 <= reqIdx && reqIdx < KMaxRequests, Kern::PanicCurrentThread(KClientPanicCat, __LINE__)); |
|
406 #ifdef DMA_APIV2 |
|
407 return iRequests[reqIdx]->FragmentCount(); |
|
408 #else |
391 return FragmentCount(iRequests[reqIdx]); |
409 return FragmentCount(iRequests[reqIdx]); |
|
410 #endif |
392 } |
411 } |
393 case RTestDma::EMissInterrupts: |
412 case RTestDma::EMissInterrupts: |
394 return iChannel->MissNextInterrupts((TInt)a1); |
413 return iChannel->MissNextInterrupts((TInt)a1); |
395 default: |
414 default: |
396 Kern::PanicCurrentThread(KClientPanicCat, __LINE__); |
415 Kern::PanicCurrentThread(KClientPanicCat, __LINE__); |