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_WriteFlash</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CARD_WriteFlash <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>BOOL CARD_WriteFlash(u32 dst, const void *src, 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%"><EM><STRONG>dst</STRONG></EM></TD> 30 <TD width="87%">The FLASH address of the transfer destination.</TD> 31 </TR> 32 <TR> 33 <TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 34 <TD width="87%">Transfer source memory address.</TD> 35 </TR> 36 <TR> 37 <TD width="13%"><EM><STRONG>len</STRONG></EM></TD> 38 <TD width="87%">Byte length of data to be written.</TD> 39 </TR> 40 </TBODY> 41</TABLE> 42 43<h2>Return Values</h2> 44<p>TRUE if the process succeeds. FALSE otherwise.</p> 45 46<H2>Description</H2> 47<P>This function writes data to the FLASH device. The function does not return control until it has finished processing. It returns TRUE if the process was successful or FALSE if it failed. To get the detailed result value when processing fails, call the <A href="../common/CARD_GetResultCode.html"><CODE>CARD_GetResultCode</CODE></A> function. 48</P> 49 50<h2>Note</h2> 51<ul> 52<li>To use this function, you must first lock the access bus with the <A href="../backup/CARD_LockBackup.html"><CODE>CARD_LockBackup</CODE></A> function.</li> 53<li>This function communicates with the ARM7 processor internally via PXI. The process will not end if PXI interrupts are not enabled.</li> 54<li style="color:Red">Because some high-capacity flash devices do not support "Write" operations, <a href="../card_result_const.html">CARD_RESULT_UNSUPPORTED</a> is returned and execution fails even if this function is called. See the <a href="../overview/about_Backup.html"><B>Backup Access Overview</B></a> for more details, and then use substitute functions, such as <a href="CARD_WriteFlashSector.html"><CODE>CARD_WriteFlashSector</CODE></a>, when necessary.</li> 55</ul> 56 57<h2>See Also</h2> 58<p><CODE><A href="../common/CARD_GetResultCode.html">CARD_GetResultCode</A>, <A href="CARD_IsBackupFlash.html">CARD_IsBackupFlash</A>, <A href="CARD_WriteFlashAsync.html">CARD_WriteFlashAsync</A>, <A href="CARD_ReadFlash.html">CARD_ReadFlash</A>, <A href="CARD_VerifyFlash.html">CARD_VerifyFlash</A>, <A href="CARD_WriteAndVerifyFlash.html">CARD_WriteAndVerifyFlash</A></CODE></p> 59 60<H2>Revision History</H2> 61<P> 622007/11/13 Added a description of the fact that some high-capacity flash devices cannot use this function. <br />2004/12/09 Changed "IO processor" to "ARM7 processor". <br>2004/08/31 Added a description for the <code>CARD_GetResultCode</code> function. <br>2004/08/23 Initial version.<BR> 63</P> 64<hr><p>CONFIDENTIAL</p></body> 65</html> 66