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>NANDOpenAsync</title> 9</head> 10 11<body> 12 13<h1>NANDOpenAsync</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/nand.h> 18 19#define NAND_ACCESS_READ 0x01 20#define NAND_ACCESS_WRITE 0x02 21#define NAND_ACCESS_RW (NAND_ACCESS_READ | NAND_ACCESS_WRITE) 22 23typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); 24 25s32 NANDOpenAsync( const char *path, NANDFileInfo *info, u8 accType, NANDCallback cb, NANDCommandBlock *block ); 26</pre></dd></dl> 27 28<h2>Arguments</h2> 29<p> 30<TABLE class="arguments" border="1" > 31 <tr> 32<TH>path</TH> 33<TD>File name to open.</TD> 34 </tr> 35 <tr> 36<TH>info</TH> 37<TD>Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD> 38 </tr> 39 <tr> 40<TH>accType</TH> 41<TD>Access type. Specifies either <code>NAND_ACCESS_READ</code>, <code>NAND_ACCESS_WRITE</code> or <code>NAND_ACCESS_RW</code>.</TD> 42 </tr> 43 <tr> 44<TH>cb</TH> 45<TD>Callback function to call when this function completes processing.</TD> 46 </tr> 47 <tr> 48<TH>block</TH> 49<TD>Command block structure to be passed to the callback function.</TD> 50 </tr> 51</TABLE> 52</p> 53 54<h2>Return Values</h2> 55<p> 56The result codes that may be returned by <code>NANDOpenAsync</code> are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally. 57<p> 58<code> 59NAND_RESULT_OK<br> 60NAND_RESULT_ACCESS<br> 61NAND_RESULT_ALLOC_FAILED<br> 62NAND_RESULT_BUSY<br> 63NAND_RESULT_INVALID<br> 64NAND_RESULT_FATAL_ERROR<br> 65</code> 66</p> 67<p> 68The result codes that may be passed to the callback function are listed below. 69</p> 70<p> 71<code> 72NAND_RESULT_ACCESS<br> 73NAND_RESULT_AUTHENTICATION<br> 74NAND_RESULT_CORRUPT<br> 75NAND_RESULT_ECC_CRIT<br> 76NAND_RESULT_INVALID<br> 77NAND_RESULT_UNKNOWN<br> 78NAND_RESULT_FATAL_ERROR<br> 79</code> 80</p> 81</p> 82 83<H2>Description</H2> 84<p> 85Asynchronously opens a file. Proper access rights are required to open a file. You can't open files if you don't have permission to access those files. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full. 86</p> 87 88<h2>See Also</h2> 89<p class="reference"> 90<a href="./NANDOpen.html">NANDOpen</a>, 91<a href="./NANDClose.html">NANDClose</a>, 92<a href="./NANDCloseAsync.html">NANDCloseAsync</a> 93</p> 94 95<H2>Revision History</H2> 96<p> 972008/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/06/16 Initial version.<BR> 98</p> 99 100<hr><p>CONFIDENTIAL</p></body> 101</html> 102