1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=utf-8">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>MI_DmaSend*</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">MI_DmaSend* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14<DD><CODE>#include &lt;nitro/mi.h&gt;</CODE><BR> <BR> <CODE>void MI_DmaSend32( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size );<BR></CODE><BR> <CODE>void MI_DmaSend32_SetUp( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size );<BR></CODE><BR> <CODE>void MI_DmaSend16( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaSend16_SetUp( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaSend32Async( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaSend32Async_SetUp( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaSend16Async( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaSend16Async_SetUp( u32 dmaNo,<BR> const void* src,<BR> volatile void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR>
15</DL>
16<H2>Arguments</H2>
17<TABLE border="1" width="100%">
18  <TBODY>
19    <TR>
20<TD width="13%"><EM><STRONG>dmaNo</STRONG></EM></TD>
21<TD width="87%">DMA channel used.</TD>
22    </TR>
23    <TR>
24<TD width="13%"><EM><STRONG>src</STRONG></EM></TD>
25<TD width="87%">The transfer source address.</TD>
26    </TR>
27    <TR>
28<TD width="13%"><EM><STRONG>dest</STRONG></EM></TD>
29<TD width="87%">The transfer destination address.</TD>
30    </TR>
31    <TR>
32<TD><EM><STRONG>size</STRONG></EM></TD>
33<TD>Transfer size.</TD>
34    </TR>
35    <TR>
36<TD><EM><STRONG>callback</STRONG></EM></TD>
37<TD>Callback when DMA ends.</TD>
38    </TR>
39    <TR>
40<TD><EM><STRONG>arg</STRONG></EM></TD>
41<TD>Callback argument when DMA ends.</TD>
42    </TR>
43  </TBODY>
44</TABLE>
45<H2>Return Values</H2>
46<P>None.</P>
47<H2>Description</H2>
48<P>Uses DMA to send data to the same address.<br />The function does not change the address of the transfer destination. It increments only the transfer origin address, and repeatedly transfers contiguous region data to the same address.</P>
49<P>The <CODE>*_SetUp</CODE> functions only configure the given settings without actually performing DMA. To actually start DMA, call the <CODE><A href="MI_DmaRestart.html">MI_DmaRestart</A></CODE> function.</P>
50<P>The <CODE>MI_DmaSend16*</CODE> functions transfer in 16-bit units. Both the transfer source address and the transfer destination address must be 2-byte aligned. The <CODE>MI_DmaSend16*</CODE> functions transfer in 32-bit units. Both the transfer source address and the transfer destination address must be 4-byte aligned.</P>
51<P><code>MI_DmaSend16()</code> and <code>MI_DmaSend32()</code> wait within the function until DMA completes. <code>MI_DmaSend16Async()</code> and <code>MI_DmaSend32Async()</code> call a callback function when DMA ends. The callback, <em><strong><code>callback</code></strong></em>, is a <code>MIDmaCallback</code> type (a <code>void</code> type function that takes one <code>void*</code> argument). <code>callback</code> is called from the system DMA interrupt handler and therefore is called while interrupts are prohibited.</P>
52<P>It is necessary to understand how to use Async-type APIs in order to obtain maximum functionality. Refer to the <CODE><A href="MI_DmaCopy.html">MI_DmaCopy</A></CODE> function for more information about this.</P>
53<H3><br> DMA Controller Bugs</H3>
54<P>See the section titled &quot;DMA Controller Bugs&quot; in the reference for the <CODE><A href="MI_DmaCopy.html">MI_DmaCopy</A></CODE> function.</P>
55<H2>Internal Operation</H2>
56<P>Uses the following IO registers: DMA<i>n</i> source register (0x40000B0 + 12<i>n</i>), DMA<i>n</i> destination register (0x40000B4 + 12<i>n</i>), and DMA<i>n</i> control register (0x40000B8 + 12<i>n</i>). (<i>n</i> is the DMA channel used.))</P>
57<H2>See Also</H2>
58<P><CODE><A href="MI_DmaCopy.html">MI_DmaCopy*</A><BR> <A href="MI_DmaFill.html">MI_DmaFill*</A><BR> <A href="MI_DmaClear.html">MI_DmaClear*</A><BR> <A href="MI_DmaRecv.html">MI_DmaRecv*</A><BR> <A href="../memory/MI_CpuSend.html">MI_CpuSend*</A><BR> <A href="MI_DmaRestart.html">MI_DmaRestart</A><BR></CODE></P>
59<H2>Revision History</H2>
60<P>2009/11/20 Added a description of bugs for the DMA controller.<BR>2007/10/31 Added <CODE>_SetUp()</CODE>.<BR>2005/03/08 Standardized the notation used for the term &quot;interrupt&quot; in Japanese.<BR>2004/12/22 Added a description of calling the callback.<BR>2004/01/30 Initial version.</P>
61<hr><p>CONFIDENTIAL</p></body>
62</HTML>