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 http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>NANDWrite</title> 9</head> 10 11<body> 12 13<h1>NANDWrite</h1> 14 15<h2>C Specification</h2> 16<dl><dd><pre><code> 17#include <revolution/nand.h> 18 19s32 NANDWrite(NANDFileInfo *info, const void *buf, u32 length); 20</code></pre></dd></dl> 21 22<h2>Arguments</h2> 23<p> 24<TABLE border="1" > 25 <tr> 26<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>info</EM></STRONG></CODE></TD> 27<TD width="520">Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD> 28 </tr> 29 <tr> 30<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>buf</EM></STRONG></CODE></TD> 31<TD width="520">Pointer to the start of the buffer that contains the data to be written to the internal flash memory. The buffer storing the data must be 32-byte aligned.</TD> 32 </tr> 33 <tr> 34<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>length</EM></STRONG></CODE></TD> 35<TD width="520">Number of bytes of data to write to the internal flash memory. This value must be a multiple of 32.</TD> 36 </tr> 37</TABLE> 38</p> 39 40<h2>Return Values</h2> 41<p> 42Returns the number of bytes for the written data when the write is successful. When the write fails, one of the following codes is returned: 43<p> 44<code>NAND_RESULT_ACCESS<br> NAND_RESULT_AUTHENTICATION<br> NAND_RESULT_CORRUPT<br> NAND_RESULT_INVALID<br> NAND_RESULT_MAXBLOCKS<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code> 45</p> 46</p> 47 48<H2>Description</H2> 49<p> 50Writes data to a file. 51</p> 52 53<h2>See Also</h2> 54<p> 55<code><a href="./NANDRead.html">NANDRead</a></code>, <code><a href="./NANDReadAsync.html">NANDReadAsync</a></code>, <code><a href="./NANDWriteAsync.html">NANDWriteAsync</a></code>, <code><a href="./NANDSeek.html">NANDSeek</a></code>, <code><a href="./NANDSeekAsync.html">NANDSeekAsync</a></code> 56</p> 57 58<H2>Revision History</H2> 59<p> 6006/16/2006 Initial version. <BR>08/15/2006 Added AUTHENTICATION result code.<br> 61</p> 62 63 64<hr> 65<P>CONFIDENTIAL</p> 66</BODY> 67</HTML> 68