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=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<title>MI_VBlankDmaCopy*</title>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</head>
10<body>
11<h1 align="left">MI_VBlankDmaCopy* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<dl>
14  <dd>
15<CODE>#include &lt;nitro/mi.h&gt;</CODE><BR> <BR> <CODE>void MI_VBlankDmaCopy32( u32 dmaNo, const void* src, void* dest, u32 size );</CODE><br> <CODE>void MI_VBlankDmaCopy16( u32 dmaNo, const void* src, void* dest, u32 size );</CODE><BR> <BR> <CODE>void MI_VBlankDmaCopy32Async( u32 dmaNo, const void* src, void* dest, u32 size,</CODE><BR> <CODE> MIDmaCallback callback, void* arg );</CODE><BR> <CODE>void MI_VBlankDmaCopy16Async( u32 dmaNo, const void* src, void* dest, u32 size,</CODE><BR> <CODE> MIDmaCallback callback, void* arg );</CODE></dd>
16</dl>
17<h2>Arguments</h2>
18<TABLE border="1" width="100%">
19  <TBODY>
20    <TR>
21<TD width="13%"><EM><STRONG>dmaNo</STRONG></EM></TD>
22<TD width="87%">DMA channel used.</TD>
23    </TR>
24    <TR>
25<TD width="13%"><EM><STRONG>src</STRONG></EM></TD>
26<TD width="87%">The transfer source address.</TD>
27    </TR>
28    <TR>
29<TD width="13%"><EM><STRONG>dest</STRONG></EM></TD>
30<TD width="87%">The transfer destination address.</TD>
31    </TR>
32    <TR>
33<TD><EM><STRONG>size</STRONG></EM></TD>
34<TD>Transfer size.
35      </TD>
36    </TR>
37    <TR>
38<TD><EM><STRONG>callback</STRONG></EM></TD>
39<TD>Callback when DMA ends.</TD>
40    </TR>
41    <TR>
42<TD><EM><STRONG>arg</STRONG></EM></TD>
43<TD>Callback argument when DMA ends.</TD>
44    </TR>
45  </TBODY>
46</TABLE>
47<h2>Return Values</h2>
48<p>None.</p>
49<H2>Description</H2>
50<P>This function uses DMA to perform a V-Blank copy. When a V-Blank starts, DMA starts.</P>
51<P><CODE>MI_VBlankDmaCopy16()</CODE> and <CODE>MI_VBlankDmaCopy16Async()</CODE> copy in units of 16 bits. Both the transfer source address and the transfer destination address must be 2-byte aligned. <CODE>MI_VBlankDmaCopy32()</CODE> and <CODE>MI_VBlankDmaCopy32Async()</CODE> copy in units of 32 bits. Both the transfer source address and the transfer destination address must be 4-byte aligned.</P>
52<P><CODE>MI_VBlankDmaCopy16()</CODE> and <CODE>MI_VBlankDmaCopy32()</CODE> start a DMA when a V-Blank is generated, and then wait for it to end. <CODE>MI_VBlankDmaCopy16Async()</CODE> and <CODE>MI_VBlankDmaCopy32Async()</CODE> start DMA when a V blank is generated and call a callback, <em><strong><code>callback</code></strong></em>, when ending DMA. 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>
53<P>It is necessary to understand how to use Async-type APIs in order to obtain maximum functionality.</P>
54<h2>Internal Operation</h2>
55<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>
56<h2>See Also</h2>
57<p><CODE><A href="MI_DmaCopy.html">MI_DmaCopy*</A><br></CODE></p>
58<H2>Revision History</H2>
59<P>
602005/03/08 Standardized the Japanese term for &quot;interrupt.&quot;<br> 2004/12/22 Added a description regarding <em><strong><code>callback</code></strong></em>. <BR> 2003/12/01 Initial version.</P>
61<hr><p>CONFIDENTIAL</p></body>
62</html>
63