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_DmaFill*</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MI_DmaFill* <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_DmaFill32( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaFill32_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaFill16( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaFill16_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size );</CODE><BR> <BR> <CODE>void MI_DmaFill32Async( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaFill32Async_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaFill16Async( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE><BR> <BR> <CODE>void MI_DmaFill16Async_SetUp( u32 dmaNo,<BR> void* dest,<BR> u32 data,<BR> u32 size,<BR> MIDmaCallback callback,<BR> void* arg );</CODE>
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 transfer destination address.</TD>
32    </TR>
33    <TR>
34<TD width="13%"><EM><STRONG>data</STRONG></EM></TD>
35<TD width="87%">The data that will be transferred</TD>
36    </TR>
37    <TR>
38<TD><EM><STRONG>size</STRONG></EM></TD>
39<TD>Transfer size.
40      </TD>
41    </TR>
42    <TR>
43<TD><EM><STRONG>callback</STRONG></EM></TD>
44<TD>Callback when DMA ends.</TD>
45    </TR>
46    <TR>
47<TD><EM><STRONG>arg</STRONG></EM></TD>
48<TD>Callback argument when DMA ends.</TD>
49    </TR>
50  </TBODY>
51</TABLE>
52
53<h2>Return Values</h2>
54<p>None.</p>
55
56<H2>Description</H2>
57<P>Uses DMA to fill memory with the specified data.</P>
58<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>
59<P>The <CODE>MI_DmaFill16*</CODE> functions fill memory with the specified data in 16-bit units. You must 2-byte align the transfer destination address. The <CODE>MI_DmaFill32*</CODE> functions fill memory with the specified data in 32-bit units. The transfer destination address must be 4-byte aligned.</P>
60<P><code>MI_DmaFill16()</code> and <code>MI_DmaFill32()</code> wait within the function until DMA completes. <CODE>MI_DmaFill16Async*()</CODE> and <CODE>MI_DmaFill32Async*()</CODE> call the <B><I>callback</I></B> 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>
61<h2>Internal Operation</h2>
62<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.))In addition, the <code>HW_DMA_CLEAR_DATA_BUF</code> region is used for fill. This region is occupied by shared memory for the TEG board but is mapped to the IO registers for TS.</P>
63<h2>See Also</h2>
64<p><CODE><A href="MI_DmaCopy.html">MI_DmaCopy*</A><BR> <A href="MI_DmaClear.html">MI_DmaClear*</A><BR> <A href="MI_DmaSend.html">MI_DmaSend*</A><BR><A href="../memory/MI_CpuFill.html">MI_CpuFill*</A><BR> <A href="MI_DmaRestart.html">MI_DmaRestart</A><br></CODE></p>
65<H2>Revision History</H2>
66<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>
67<hr><p>CONFIDENTIAL</p></body>
68</html>
69