embeddedsw/XilinxProcessorIPLib/drivers/axidma/doc/html/api/xaxidma_8c.html

515 lines
24 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
xaxidma.c File Reference
</title>
<link href="$DriverApiDocsCssPath" rel="stylesheet" type="text/css">
</head>
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
<hl>Software Drivers</hl>
<hr class="whs1">
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul></div>
<h1>xaxidma.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
This file implements DMA engine-wise initialization and control functions. For more information on the implementation of this driver, see xaxidma.h.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- ---- -------- -------------------------------------------------------
1.00a jz 05/18/10 First release
2.00a jz 08/10/10 Second release, added in <a class="el" href="xaxidma__g_8c.html">xaxidma_g.c</a>, <a class="el" href="xaxidma__sinit_8c.html">xaxidma_sinit.c</a>,
updated tcl file, added <a class="el" href="xaxidma__porting__guide_8h.html">xaxidma_porting_guide.h</a>
3.00a jz 11/22/10 Support IP core parameters change
4.00a rkv 02/22/11 Added support for simple DMA mode
New API added for simple DMA mode are<ul>
<li>XAxiDma_Busy</li><li>XAxiDma_SimpleTransfer
6.00a srt 01/24/12 Added support for Multi-Channel DMA mode.</li></ul>
</pre><p>
<pre>Changed APIs:
* XAxiDma_Start(XAxiDma * InstancePtr, int RingIndex)
* XAxiDma_Started(XAxiDma * InstancePtr, int RingIndex)
* XAxiDma_Pause(XAxiDma * InstancePtr, int RingIndex)
* XAxiDma_Resume(XAxiDma * InstancePtr, int RingIndex)
* XAxiDma_SimpleTransfer(<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr,
u32 BuffAddr, u32 Length,
int Direction, int RingIndex)<ul>
<li>New API:
* XAxiDma_SelectKeyHole(<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr,
int Direction, int Select)
7.00a srt 06/18/12 All the APIs changed in v6_00_a are reverted back for
backward compatibility.
7.01a srt 10/26/12 Fixed issue with driver as it fails with IP version
&lt; 6.00a as the parameter C_NUM_*_CHANNELS is not
applicable.
8.0 srt 01/29/14 Added support for Micro DMA Mode and Cyclic mode of
operations.</li><li>New API:
* XAxiDma_SelectCyclicMode(<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr,
int Direction, int Select)</li></ul>
</pre><p>
<pre> </pre>
<p>
<code>#include &quot;xaxidma.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#f2be96f61d6d7c132103e4647de65fd3">XAxiDma_CfgInitialize</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr, <a class="el" href="struct_x_axi_dma___config.html">XAxiDma_Config</a> *Config)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#60dc9f81136d64241090a2680e59c8e1">XAxiDma_Reset</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#b5a62cc4019b4470ed4f72b8dfda9409">XAxiDma_ResetIsDone</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#c298374c5718cc8cd8f16849ef7a8fee">XAxiDma_Pause</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#045feadb1b7575e460f6cfdb3f0fffe4">XAxiDma_Resume</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#2a20198c9dda6c208b5deb5100d18de3">XAxiDma_Busy</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr, int Direction)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#e106aa5f18d9be9a67d3e49f19b9bde6">XAxiDma_SelectKeyHole</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr, int Direction, int Select)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#52e8506fc702959028d8a70ce1a3d3c3">XAxiDma_SelectCyclicMode</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr, int Direction, int Select)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma_8c.html#424781497ff1ca2fb5481a2db92412d2">XAxiDma_SimpleTransfer</a> (<a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *InstancePtr, u32 BuffAddr, u32 Length, int Direction)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="2a20198c9dda6c208b5deb5100d18de3"></a><!-- doxytag: member="xaxidma.c::XAxiDma_Busy" ref="2a20198c9dda6c208b5deb5100d18de3" args="(XAxiDma *InstancePtr, int Direction)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u32 XAxiDma_Busy </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Direction</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function checks whether specified DMA channel is busy<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is the driver instance we are working on</td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is DMA transfer direction, valid values are<ul>
<li>XAXIDMA_DMA_TO_DEVICE.</li><li>XAXIDMA_DEVICE_TO_DMA.</li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>- TRUE if channel is busy<ul>
<li>FALSE if channel is idle</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="f2be96f61d6d7c132103e4647de65fd3"></a><!-- doxytag: member="xaxidma.c::XAxiDma_CfgInitialize" ref="f2be96f61d6d7c132103e4647de65fd3" args="(XAxiDma *InstancePtr, XAxiDma_Config *Config)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_CfgInitialize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="struct_x_axi_dma___config.html">XAxiDma_Config</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>Config</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function initializes a DMA engine. This function must be called prior to using a DMA engine. Initializing a engine includes setting up the register base address, setting up the instance data, and ensuring the hardware is in a quiescent state.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the DMA engine instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Config</em>&nbsp;</td><td>is a pointer to an <a class="el" href="struct_x_axi_dma___config.html">XAxiDma_Config</a> structure. It contains the information about the hardware build, including base address,and whether status control stream (StsCntrlStrm), MM2S and S2MM are included in the build.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS for successful initialization</li><li>XST_INVALID_PARAM if pointer to the configuration structure is NULL</li><li>XST_DMA_ERROR if reset operation failed at the end of initialization</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>We assume the hardware building tool will check and error out for a hardware build that has no transfer channels. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="c298374c5718cc8cd8f16849ef7a8fee"></a><!-- doxytag: member="xaxidma.c::XAxiDma_Pause" ref="c298374c5718cc8cd8f16849ef7a8fee" args="(XAxiDma *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_Pause </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Pause DMA transactions on both channels.<p>
If the engine is running and doing transfers, this function does not stop the DMA transactions immediately, because then hardware will throw away our previously queued transfers. All submitted transfers will finish. Transfers submitted after this function will not start until <a class="el" href="xaxidma__bdring_8c.html#80d68862fd44c386c81a4e6b03d6c7a8">XAxiDma_BdRingStart()</a> or <a class="el" href="xaxidma_8c.html#045feadb1b7575e460f6cfdb3f0fffe4">XAxiDma_Resume()</a> is called.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the DMA engine instance to be worked on.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if successful</li><li>XST_NOT_SGDMA, if the driver instance is not initialized</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="60dc9f81136d64241090a2680e59c8e1"></a><!-- doxytag: member="xaxidma.c::XAxiDma_Reset" ref="60dc9f81136d64241090a2680e59c8e1" args="(XAxiDma *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XAxiDma_Reset </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Reset both TX and RX channels of a DMA engine.<p>
Reset one channel resets the whole AXI DMA engine.<p>
Any DMA transaction in progress will finish gracefully before engine starts reset. Any other transactions that have been submitted to hardware will be discarded by the hardware.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the DMA engine instance to be worked on.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>After the reset:<ul>
<li>All interrupts are disabled.</li><li>Engine is halted </li></ul>
</dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="b5a62cc4019b4470ed4f72b8dfda9409"></a><!-- doxytag: member="xaxidma.c::XAxiDma_ResetIsDone" ref="b5a62cc4019b4470ed4f72b8dfda9409" args="(XAxiDma *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_ResetIsDone </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Check whether reset is done<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the DMA engine instance to be worked on.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>1 if reset is done.</li><li>0 if reset is not done</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="045feadb1b7575e460f6cfdb3f0fffe4"></a><!-- doxytag: member="xaxidma.c::XAxiDma_Resume" ref="045feadb1b7575e460f6cfdb3f0fffe4" args="(XAxiDma *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_Resume </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Resume DMA transactions on both channels.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is a pointer to the DMA engine instance to be worked on.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS for success</li><li>XST_NOT_SGDMA if the driver instance has not been initialized</li><li>XST_DMA_ERROR if one of the channels fails to start</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="52e8506fc702959028d8a70ce1a3d3c3"></a><!-- doxytag: member="xaxidma.c::XAxiDma_SelectCyclicMode" ref="52e8506fc702959028d8a70ce1a3d3c3" args="(XAxiDma *InstancePtr, int Direction, int Select)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_SelectCyclicMode </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Direction</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Select</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function Enable or Disable Cyclic Mode Feature<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is the driver instance we are working on</td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is DMA transfer direction, valid values are<ul>
<li>XAXIDMA_DMA_TO_DEVICE.</li><li>XAXIDMA_DEVICE_TO_DMA. Select is the option to enable (TRUE) or disable (FALSE).</li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>- XST_SUCCESS for success</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="e106aa5f18d9be9a67d3e49f19b9bde6"></a><!-- doxytag: member="xaxidma.c::XAxiDma_SelectKeyHole" ref="e106aa5f18d9be9a67d3e49f19b9bde6" args="(XAxiDma *InstancePtr, int Direction, int Select)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_SelectKeyHole </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Direction</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Select</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function Enable or Disable KeyHole Feature<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is the driver instance we are working on</td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is DMA transfer direction, valid values are<ul>
<li>XAXIDMA_DMA_TO_DEVICE.</li><li>XAXIDMA_DEVICE_TO_DMA. Select is the option to enable (TRUE) or disable (FALSE).</li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>- XST_SUCCESS for success</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="424781497ff1ca2fb5481a2db92412d2"></a><!-- doxytag: member="xaxidma.c::XAxiDma_SimpleTransfer" ref="424781497ff1ca2fb5481a2db92412d2" args="(XAxiDma *InstancePtr, u32 BuffAddr, u32 Length, int Direction)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XAxiDma_SimpleTransfer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_axi_dma.html">XAxiDma</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>BuffAddr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Length</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int&nbsp;</td>
<td class="mdname" nowrap> <em>Direction</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function does one simple transfer submission<p>
It checks in the following sequence:<ul>
<li>if engine is busy, cannot submit</li><li>if engine is in SG mode , cannot submit</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em>&nbsp;</td><td>is the pointer to the driver instance </td></tr>
<tr><td valign="top"></td><td valign="top"><em>BuffAddr</em>&nbsp;</td><td>is the address of the source/destination buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Length</em>&nbsp;</td><td>is the length of the transfer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is DMA transfer direction, valid values are<ul>
<li>XAXIDMA_DMA_TO_DEVICE.</li><li>XAXIDMA_DEVICE_TO_DMA.</li></ul>
</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS for success of submission</li><li>XST_FAILURE for submission failure, maybe caused by: Another simple transfer is still going</li><li>XST_INVALID_PARAM if:Length out of valid range [1:8M] Or, address not aligned when DRE is not built in</li></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>This function is used only when system is configured as Simple mode. </dd></dl>
</td>
</tr>
</table>
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.