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=utf-8"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_VBlankDmaCopy*</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_VBlankDmaCopy* <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 <nitro/mi.h></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> 20</dl> 21<h2>Arguments</h2> 22<TABLE border="1" width="100%"> 23 <TBODY> 24 <TR> 25<TD width="13%"><EM><STRONG>dmaNo</STRONG></EM></TD> 26<TD width="87%">DMA channel used.</TD> 27 </TR> 28 <TR> 29<TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 30<TD width="87%">The transfer source address.</TD> 31 </TR> 32 <TR> 33<TD width="13%"><EM><STRONG>dest</STRONG></EM></TD> 34<TD width="87%">The transfer destination address.</TD> 35 </TR> 36 <TR> 37<TD><EM><STRONG>size</STRONG></EM></TD> 38<TD>Transfer size. 39 </TD> 40 </TR> 41 <TR> 42<TD><EM><STRONG>callback</STRONG></EM></TD> 43<TD>Callback when DMA ends.</TD> 44 </TR> 45 <TR> 46<TD><EM><STRONG>arg</STRONG></EM></TD> 47<TD>Callback argument when DMA ends.</TD> 48 </TR> 49 </TBODY> 50</TABLE> 51<h2>Return Values</h2> 52<p>None.</p> 53 54<H2>Description</H2> 55<P>This function uses DMA to perform a V-Blank copy. When a V-Blank starts, DMA starts.</P> 56<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> 57<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> 58<P>It is necessary to understand how to use Async-type APIs in order to obtain maximum functionality.</P> 59<H3><br> DMA Controller Bugs</H3> 60<P>See the section titled "DMA Controller Bugs" in the reference for the <CODE><A href="MI_DmaCopy.html">MI_DmaCopy</A></CODE> function.</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.))</P> 63<h2>See Also</h2> 64<p><CODE><A href="MI_DmaCopy.html">MI_DmaCopy*</A></CODE></p> 65 66<H2>Revision History</H2> 67<P>2009/11/20 Added a description of the bugs for the DMA controller.<BR>2005/03/08 Standardized the notation used for the Japanese term <I>interrupt</I>.<BR>2004/12/22 Added a description of calling the callback.<BR>2003/12/03 Initial version.</P> 68<hr><p>CONFIDENTIAL</p></body> 69</html> 70