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>CARD_ReadRom</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CARD_ReadRom <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/card.h></CODE><BR> 20 <BR> 21 <CODE>void CARD_ReadRom(u32 dma, const void *src, void *dst, u32 len);</CODE><br> 22 <br> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1" width="100%"> 27 <TBODY> 28 <TR> 29<TD width="13%"><SPAN class="argument">dma</SPAN></TD> 30<TD width="87%">The DMA channel to use for the transfer between 0 and <CODE>MI_DMA_MAX_NUM</CODE>.<br />If the program is running in TWL mode, the parent DMA channel can be specified in the range of <CODE>(MI_DMA_USING_NEW+0)</CODE> to <CODE>(MI_DMA_USING_NEW+MI_DMA_MAX_NUM)</CODE>.<br />The CPU processes the transfer directly without using DMA transfer if an out-of-range channel has been specified or if <CODE>MI_DMA_NOT_USE</CODE> has been explicitly specified.</TD> 31 </TR> 32 <TR> 33<TD width="13%"><SPAN class="argument">src</SPAN></TD> 34<TD width="87%">The transfer source CARD ROM address.</TD> 35 </TR> 36 <TR> 37<TD width="13%"><SPAN class="argument">dst</SPAN></TD> 38<TD width="87%">Transfer destination memory address.</TD> 39 </TR> 40 <TR> 41<TD width="13%"><SPAN class="argument">len</SPAN></TD> 42<TD width="87%">Length of data being read, in bytes.</TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<h2>Return Values</h2> 48<p>None.</p> 49 50<h2>Description</h2> 51<p>Synchronously reads data from a device that has ROM. This function is equivalent to calling the <a href="CARD_ReadRomAsync.html"><code>CARD_ReadRomAsync</code></A> function with no callback specified and then unconditionally waiting for it to complete.</p> 52<p>For details on internal function operations, see the explanation for the <a href="CARD_ReadRomAsync.html"><code>CARD_ReadRomAsync</code></A> function.</p> 53 54<h2>Note</h2> 55<p> 56<ul style='color:red;'> 57<li>To use this function, you must first lock the access bus with the <a href="CARD_LockRom.html"><CODE>CARD_LockRom</CODE></A> function.</li> 58<li>If a valid DMA channel is specified by this function, that DMA channel will not be available until transfer is complete.</li> 59<li>The transfer source for Card access is an IO register, so you cannot specify DMA channel 0 unless the program is running in TWL mode and the <a href="../../scfg/scfg/SCFG_IsDmacFixed.html"><code>SCFG_IsDmacFixed</code></a> function has returned <CODE>TRUE</CODE>.</li> 60<li>Note that this function uses interrupts internally, so processing will not complete if it continues to wait while interrupts are prohibited.</li> 61</ul> 62</p> 63 64<h2>See Also</h2> 65<p><A href="CARD_LockRom.html"><CODE>CARD_LockRom</CODE></A><BR> <A href="CARD_ReadRomAsync.html"><CODE>CARD_ReadRomAsync</CODE></A></p> 66 67<H2>Revision History</H2> 68<P> 692008/11/19 Added information about the relationship between the DMA channel range and the operating mode.<br /> 2008/01/24 Added a note on the range of DMA channels to specify.<br /> 2005/04/28 Explained that DMA channel 0 cannot be specified.<br /> 2004/11/02 Corrected argument names to match the header file.<br /> 2004/07/13 Added notes about using DMA.<br> 2004/07/09 Revised descriptions due to function format changes.<br> 2004/07/05 Initial version. 70</P> 71<hr><p>CONFIDENTIAL</p></body> 72</html> 73