1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>MI_DmaClear*</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MI_DmaClear* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;nitro/mi.h&gt;</CODE><BR> <BR> <CODE>void MI_DmaClear32( u32 dmaNo,<BR> void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaClear32_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaClear16( u32 dmaNo,<BR> void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaClear16_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaClear32Async( u32 dmaNo,<BR> void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaClear32Async_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaClear16Async( u32 dmaNo,<BR> void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaClear16Async_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE> <BR>
20</dl>
21
22<h2>Arguments</h2>
23<TABLE border="1" width="100%">
24  <TBODY>
25    <TR>
26<TD width="13%"><EM><STRONG>dmaNo</STRONG></EM></TD>
27<TD width="87%">DMA channel used.</TD>
28    </TR>
29    <TR>
30<TD width="13%"><EM><STRONG>dest</STRONG></EM></TD>
31<TD width="87%">The address of the clear destination</TD>
32    </TR>
33    <TR>
34<TD><EM><STRONG>size</STRONG></EM></TD>
35<TD>Clear size
36      </TD>
37    </TR>
38    <TR>
39<TD><EM><STRONG>callback</STRONG></EM></TD>
40<TD>Callback when DMA ends.</TD>
41    </TR>
42    <TR>
43<TD><EM><STRONG>arg</STRONG></EM></TD>
44<TD>Callback argument when DMA ends.</TD>
45    </TR>
46  </TBODY>
47</TABLE>
48
49<h2>Return Values</h2>
50<p>None.</p>
51
52<H2>Description</H2>
53<P>Uses DMA to zero-clear memory.</P>
54<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>
55<P><code>MI_DmaClear16()</code> and <code>MI_DmaClear16Async()</code> fill memory with zeros in 16-bit units. You must 2-byte align the clear destination address. <code>MI_DmaClear32()</code> and <code>MI_DmaClear32Async()</code> fill memory with zeros in 32-bit units. The clear destination address must be 4-byte aligned.</P>
56<P><code>MI_DmaClear16()</code> and <code>MI_DmaClear32()</code> wait within the function until DMA completes. <code>MI_DmaClear16Async()</code> and <code>MI_DmaClear32Async()</code> call a callback function when DMA ends. The callback, <code>callback</code>, is a <code>MIDmaCallback</code> type (a <code>void</code> type function which 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>
57<h2>Internal Operation</h2>
58<P>Calls the <CODE><A href="MI_DmaFill.html">MI_DmaFill*</A></CODE> function.</P>
59<h2>See Also</h2>
60<p><CODE><A href="../memory/MI_CpuClear.html">MI_CpuClear*</A><BR><A href="MI_DmaCopy.html">MI_DmaCopy*</A><BR><A href="MI_DmaFill.html">MI_DmaFill*</A><BR><A href="MI_DmaRestart.html">MI_DmaRestart</A><BR><A href="MI_DmaSend.html">MI_DmaSend*</A></CODE></p>
61<H2>Revision History</H2>
62<P>2007/10/31 Added the <CODE>_SetUp</CODE> functions.<BR>2005/03/08 Standardized the Japanese term for &quot;interrupt.&quot;<CODE> 2004/12/22 Added a description regarding <em><strong><code>callback</code></strong></em>. </CODE> 2003/12/01 Initial version.</P>
63<hr><p>CONFIDENTIAL</p></body>
64</html>
65