First public contribution.
1 // Copyright (c) 2002-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 "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32/drivers/dma2_shared.cpp
15 // DMA Platform Independent Layer (PIL)
19 #include <drivers/dmadefs.h>
23 // Exported default constructor.
28 TDmaTransferConfig::TDmaTransferConfig()
30 iAddrMode(KDmaAddrModeConstant),
33 iElementsPerPacket(0),
34 iFramesPerTransfer(0),
37 iBurstSize(KDmaBurstSizeAny),
39 iSyncFlags(KDmaSyncAuto),
49 // General use version.
54 TDmaTransferConfig::TDmaTransferConfig(
57 TDmaAddrMode aAddrMode,
59 TDmaBurstSize aBurstSize,
61 TUint aElementsPerPacket,
68 iElementSize(aElementSize),
70 iElementsPerPacket(aElementsPerPacket),
71 iFramesPerTransfer(0),
74 iBurstSize(aBurstSize),
75 iFlags(aTransferFlags),
76 iSyncFlags(aSyncFlags),
77 iPslTargetInfo(aPslTargetInfo),
78 iRepeatCount(aRepeatCount),
91 TDmaTransferConfig::TDmaTransferConfig(
94 TUint aElementsPerFrame,
95 TUint aFramesPerTransfer,
100 TDmaBurstSize aBurstSize,
101 TUint aElementsPerPacket,
102 TUint aPslTargetInfo,
107 iAddrMode( // deduce transfer mode from skips
108 (aFrameSkip != 0) ? KDmaAddrMode2DIndex :
109 (aElementSkip != 0)? KDmaAddrMode1DIndex :
110 KDmaAddrModePostIncrement),
111 iElementSize(aElementSize),
112 iElementsPerFrame(aElementsPerFrame),
113 iElementsPerPacket(aElementsPerPacket),
114 iFramesPerTransfer(aFramesPerTransfer),
115 iElementSkip(aElementSkip),
116 iFrameSkip(aFrameSkip),
117 iBurstSize(aBurstSize),
118 iFlags(aTransferFlags),
119 iSyncFlags(aSyncFlags),
120 iPslTargetInfo(aPslTargetInfo),
121 iRepeatCount(aRepeatCount),
129 // Exported default constructor.
134 TDmaTransferArgs::TDmaTransferArgs()
136 iGraphicsOps(KDmaGraphicsOpNone),
138 iChannelPriority(KDmaPriorityNone),
154 TDmaTransferArgs::TDmaTransferArgs (
158 TUint aDmaTransferFlags,
163 TUint aChannelPriority,
164 TDmaBurstSize aBurstSize,
165 TUint aPslRequestInfo,
166 TDmaGraphicsOps aGraphicOp,
170 iSrcConfig(aSrcAddr, aDmaTransferFlags, aMode, aDmaSyncFlags, aBurstSize, aElementSize),
171 iDstConfig(aDstAddr, aDmaTransferFlags, aMode, aDmaSyncFlags, aBurstSize, aElementSize),
172 iTransferCount(aCount),
173 iGraphicsOps(aGraphicOp),
175 iFlags(aDmaPILFlags),
176 iChannelPriority(aChannelPriority),
177 iPslRequestInfo(aPslRequestInfo)
188 TDmaTransferArgs::TDmaTransferArgs(
189 const TDmaTransferConfig& aSrc,
190 const TDmaTransferConfig& aDst,
192 TUint aChannelPriority,
193 TUint aPslRequestInfo,
194 TDmaGraphicsOps aGraphicOp,
200 iGraphicsOps(aGraphicOp),
203 iChannelPriority(aChannelPriority),
204 iPslRequestInfo(aPslRequestInfo),