diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-6AC01B10-92C1-4E56-813B-6853DFCF3386-GENID-1-2-1-9-1-6-1-8-1-7-1-5-1.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-6AC01B10-92C1-4E56-813B-6853DFCF3386-GENID-1-2-1-9-1-6-1-8-1-7-1-5-1.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,44 @@ + + + + + +DMA RequestsDescribes how device drivers use DMA requests to initiate +a DMA transfer. +

DMA transfer requests are the way in which a device driver sets +up and initiates a DMA transfer. A transfer request internally comprises +a linked list of DMA descriptor headers and is associated with a single +DMA channel. A transfer request also stores an optional client-provided +callback function, which can be invoked when the whole request completes, +whether successfully or not. A DMA request can be in any of the four +states: Not configured, Idle, Being transferred, and Pending. However, +these states are not used by the driver.

+

A device driver creates a DMA request by specifying a DMA channel +and an optional DMA callback function to be called after the request +completion. A DMA request must be fragmented.

+

The following shows the creation of a DMA request:

+TInt DExDriverUartTxDma::Init() + { + ... + // A DMA request has to be created for any DMA transfer. This + // specifies the channel on which the DMA request shall be + // made, the service callback function to be called after the + // request completion (TxDmaService), and an object pointer that will be passed + // as an argument to DMA request service function (this). + // A DMA request is a list of fragments small enough to be + // transferred in one go by the DMA Controller. + // + iTxDmaRequest = new DDmaRequest(*iTxDmaChannel, TxDmaService, this); + if(iTxDmaRequest == NULL) + { + return KErrNoMemory; + } + ... + } +
\ No newline at end of file