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 http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>NANDReadAsync</title> 9</head> 10 11<body> 12 13<h1>NANDReadAsync</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/nand.h> 18 19typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); 20 21s32 NANDReadAsync( NANDFileInfo *info, void *buf, u32 length, NANDCallback cb, NANDCommandBlock *block ); 22</pre></dd></dl> 23 24<h2>Arguments</h2> 25<p> 26<TABLE class="arguments" border="1" > 27 <tr> 28<TH>info</TH> 29<TD>Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD> 30 </tr> 31 <tr> 32<TH>buf</TH> 33<TD>Pointer to the write destination for the data that was read. The write buffer must be 32-byte aligned.</TD> 34 </tr> 35 <tr> 36<TH>length</TH> 37<TD>Number of bytes to read. This value must be a multiple of 32.</TD> 38 </tr> 39 <tr> 40<TH>cb</TH> 41<TD>Callback function to call when this function completes processing.</TD> 42 </tr> 43 <tr> 44<TH>block</TH> 45<TD>Command block structure to be passed to the callback function.</TD> 46 </tr> 47</TABLE> 48</p> 49 50<h2>Return Values</h2> 51<p> 52The result codes that may be returned by <code>NANDReadAsync</code> are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally. 53<p> 54<code>NAND_RESULT_OK<br> NAND_RESULT_ACCESS<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_INVALID<br> NAND_RESULT_FATAL_ERROR<br></code> 55</p> 56<p> 57The result codes that may be passed to the callback function are listed below. When the read is successful, the number of bytes for the read data is passed to the callback function. 58</p> 59<p> 60<code>NAND_RESULT_ACCESS<br> NAND_RESULT_AUTHENTICATION<br> NAND_RESULT_CORRUPT<br> NAND_RESULT_ECC_CRIT<br> NAND_RESULT_INVALID<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code> 61</p> 62</p> 63 64<H2>Description</H2> 65<p> 66Asynchronously reads data from a file in Wii console NAND memory. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full. 67</p> 68 69<p> 70If, while the <code>NANDReadAsync</code> function is processing, certain functions or combinations of functions are called from a different thread, the processing of these other functions may be delayed or even fail. For more information about the occurrence conditions, symptoms, and workarounds, see <a href="./intro.html#NAND RW NOTICE">Notes Regarding Read/Writes to Wii Console NAND Memory</a>. 71</p> 72 73<h2>See Also</h2> 74<p class="reference"> 75<a href="./NANDRead.html">NANDRead</a><BR> <a href="./NANDWriteAsync.html">NANDWrite</a><BR> <a href="./NANDWriteAsync.html">NANDWriteAsync</a><BR> <a href="./NANDSeek.html">NANDSeek</a><BR> <a href="./NANDSeekAsync.html">NANDSeekAsync</a><BR> <a href="./intro.html#NAND RW NOTICE">Notes Regarding Read/Writes to Wii Console NAND Memory</a> 76</p> 77 78<H2>Revision History</H2> 79<p> 802009/12/02 Added the <a href="../nand/intro.html#NAND RW NOTICE">Notes Regarding Read/Writes to Wii Console NAND Memory</a> information.<br>2008/08/01 Revised the result codes that are passed to the callback function.<br>2008/05/13 Described the result codes passed to the callback function.<br>2006/10/xx Unified terminology.<br>2006/08/15 Added the <CODE>AUTHENTICATION</CODE> result code.<br>2006/06/16 Initial version.<BR> 81</p> 82 83<hr><p>CONFIDENTIAL</p></body> 84</html> 85