diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-6114133F-E738-4DF1-8308-B09C02B9CEEA.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-6114133F-E738-4DF1-8308-B09C02B9CEEA.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,279 @@ + + + + + +DMAv2 Interface OverviewDescribes the interfaces provided by the DMAv2 platform +service. +
Client +functions

The clients that require to use the DMA framework +functionality use the DDmaRequest class functions +to request DMA transfers. The clients should not set any parameters +directly but use functions of the DDmaRequest class.

+ + + +API +Description + + + + +DDmaRequest::DDmaRequest(TDmaChannel& aChannel, +TCallback, TAny*, TInt) +The constructor for the DDmaRequest class. + + +DDmaRequest::Fragment(const TDmaTransferArgs& +aTransferArgs) +Split request into a list of fragments small enough to be fed +to the DMA Controller. The size of the fragment should be less than +or equal to the maximum transfer size supported by the DMA controller. + + +DDmaRequest::Queue() +Asynchronous transfer request. + + +DDmaRequest::ExpandDesList(TInt) +Add new descriptors to the existing list. The function is to +be used by the clients that require to build a custom descriptor list. + + +DDmaRequest::ExpandSrcDesList(TInt) +Add new descriptors to the existing source port descriptor +list. + + +DDmaRequest::ExpandDstDesList(TInt) +Add new descriptors to the existing destination port descriptor +list. + + +DDmaRequest::FreeDesList() +Free resources associated with this request. + + +DDmaRequest::FreeSrcDesList() +Free resources associated with this request from the source +port descriptor chain. + + +DDmaRequest::FreeDstDesList() +Free resources associated with this request from the destination +port descriptor chain. + + +DDmaRequest::EnableSrcElementCounting(TBool) +Enables the functionality for counting the transferred source +elements. + + +DDmaRequest::EnableDstElementCounting(TBool) +Enables the functionality for counting the transferred destination +elements. + + +DDmaRequest::DisableSrcElementCounting() +Disables the functionality for counting the transferred source +elements. + + +DDmaRequest::DisableDstElementCounting() +Disables the functionality for counting the transferred destination +elements. + + +DDmaRequest::TotalNumSrcElementsTransferred() +Get the number of transferred elements at the source port. +This function can only be used if the counting is enabled. + + +DDmaRequest::TotalNumDstElementsTransferred() +Get the number of transferred elements at the destination port. +This function can only be used if the counting is enabled. + + +DDmaRequest::FragmentCount() +Returns the number of fragments that are created by this transfer +request. + + +DDmaRequest::SrcFragmentCount() +Returns the number of source port fragments that are created +by this transfer request. + + +DDmaRequest::DstFragmentCount() +Returns the number of destination port fragments that are created +by this transfer request. + + +TDmaChannel::Open(const SCreateInfo& aInfo, TDmaChannel*& +aChannel) +Open a specified channel. + + +TDmaChannel::Close() +Close a previously opened channel. + + +TDmaChannel::LinkToChannel(TDmaChannel* aChannel) +Logically link a channel with the specified argument. When +the argument is NULL the channel is unlinked. + + +TDmaChannel::Pause() +Pause an active transfer. + + +TDmaChannel::Resume() +Resume transfer on this channel. + + +TDmaChannel::CancelAll() +Cancel current and all pending requests. + + +TDmaChannel::MaxTransferLength(TUint aSrcFlags, TUint +aDstFlags, TUint32 aPslInfo) +Get the maximum transfer length of the current channel. + + +TDmaChannel::AddressAlignMask(TUint aTargetFlags, +TUint aElementSize, TUint32 aPslInfo) +Get the address or memory alignment mask. + + +TDmaChannel::DmacCaps() +Get the reference to the structure that contains the features +and the capabilities of the DMAC associated with the current channel. + + +TDmaChannel::IsrRedoRequest(TUint32 aSrcAddr=KPhysAddrInvalid, +TUint32 aDstAddr=KPhysAddrInvalid, TUint aTransferCount=0, TUint32 +aPslRequestInfo=0, TBool aIsrCb=ETrue) +Repeat the current transfer request with modified parameters. + + +TDmaChannel::IsQueueEmpty() +Check if the current transfer queue is empty. + + +TDmaChannel::PslId() +Get the PSL specific ID of the current channel. This function +is used for debugging by the PIL. + + +TDmaChannel::FailNext(TInt) +Force to fail the next transfer request. This function is for +testing purpose only. + + +TDmaChannel::MissNextInterrupts(TInt) +Force the DMAC to miss one or more interrupts. + + +TDmaChannel::Extension(TInt aCmd, TAny* aArg) +Allows PSL to extend the DMA API with a channel specific functionality. + + +TDmaChannel::StaticExtension(TInt aCmd, TAny* aArg) +Allows PSL to extend the DMA API with a channel independent +functionality. + + + +
+
DMA +controller implementationThe TDmac class +provides the functions of a DMA controller: + + + +API +Description + + + + +TDmac::Transfer(const TDmaChannel& aChannel, const +SDmaDesHdr& aHdr) +Initiate a transfer request on a specified channel. + + +TDmac::StopTransfer(const TDmaChannel& aChannel) +Stop a data transfer on a specified channel. + + +TDmac::IsIdle(const TDmaChannel& aChannel) +Get the state of a specified channel. + + +TDmac::Extension() +Implement a platform specific functionality per channel. + + + +
+
Channel +manager implementation

The DmaChannelMgr class provides functions to open and close the channels by the PIL. +Implement the following functions in the PSL:

+ + + +API +Description + + + + +DmaChannelMgr::Open(TUint32 aOpenId, TBool aDynChannel, +TUint aPriority) +Open a channel with a specified channel ID. + + +DmaChannelMgr::Close() +Close a channel. + + + +
+
DMA +channel implementation

The TDmaChannel class provides the functions to implement a DMA channel. There are +three types of DMA channels that be can be implemented as described +below.

+ + + +Class +Description + + + + +TDmaSbChannel +Class to implement a single buffer channel. + + +TDmaDbChannel +Class to implement a double buffer channel. + + +TDmaSgChannel +Class to implement a scatter-gather channel. + + +TDmaAsymSgChannel +Channel class for controllers using asymmetric descriptor lists. + + + +
+
\ No newline at end of file