Adaptation/GUID-6AC01B10-92C1-4E56-813B-6853DFCF3386-GENID-1-2-1-10-1-5-1-5-1-1-7-1-9-1-4-1.dita
changeset 15 307f4279f433
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Adaptation/GUID-6AC01B10-92C1-4E56-813B-6853DFCF3386-GENID-1-2-1-10-1-5-1-5-1-1-7-1-9-1-4-1.dita	Fri Oct 15 14:32:18 2010 +0100
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept id="GUID-6AC01B10-92C1-4E56-813B-6853DFCF3386-GENID-1-2-1-10-1-5-1-5-1-1-7-1-9-1-4-1" xml:lang="en"><title>DMA Requests</title><shortdesc>Describes how device drivers use DMA requests to initiate
+a DMA transfer.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
+<p>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. </p>
+<p>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. </p>
+<p>The following shows the creation of a DMA request: </p>
+<codeblock id="GUID-B2753DE7-800E-57CC-B2B6-CA2548AC25C4-GENID-1-2-1-10-1-5-1-5-1-1-7-1-9-1-4-1-3-4" xml:space="preserve">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;
+        }
+    ...
+    }</codeblock>
+</conbody></concept>
\ No newline at end of file