equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 |
|
17 inline TInt DDmaHelper::PageSizeLog2() { return iPageSizeLog2; } |
|
18 inline TBool DDmaHelper::IsPageAligned(TLinAddr aAddr) { return !(aAddr & iPageSizeMsk); } |
|
19 inline TLinAddr DDmaHelper::PageAlign(TLinAddr aAddr) { return aAddr & ~iPageSizeMsk; } |
|
20 inline TLinAddr DDmaHelper::PageOffset(TLinAddr aAddr) { return aAddr & iPageSizeMsk; } |
|
21 |
|
22 |
|
23 inline TInt DDmaHelper::MaxFragLength() const { return iMaxPages << iPageSizeLog2; } |
|
24 inline void DDmaHelper::SetFragLength(TInt aLength) { iFragLen = iFragLenRemaining = aLength; } |
|
25 inline TInt DDmaHelper::FragLength() const { return iFragLen; } |
|
26 inline TInt DDmaHelper::LengthRemaining() const { return iReqLenClient - iLenConsumed; } |
|
27 inline TUint32 DDmaHelper::LengthConsumed() const {return iLenConsumed; } |
|
28 |
|
29 |
|
30 inline TBool DDmaHelper::IsDmaAligned(TLinAddr aAddr) { return !(aAddr & (iDmaAlignment-1)); } |
|
31 |
|
32 inline TBool DDmaHelper::IsBlockAligned(TInt64 aPos) { return !(aPos & iMediaBlockSizeMask); } |
|
33 inline TInt64 DDmaHelper::BlockAlign(TInt64 aPos) { return aPos & ~iMediaBlockSizeMask; } |
|
34 inline TInt DDmaHelper::BlockOffset(TInt64 aPos) { return TInt(aPos & iMediaBlockSizeMask); } |
|
35 |
|
36 inline TLinAddr DDmaHelper::LinAddress() const { return iLinAddressUser + ((TUint32) iReqRemoteDesOffset) + iLenConsumed; } |
|
37 |