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>NANDSeekAsync</title> 9</head> 10 11<body> 12 13<h1>NANDSeekAsync</h1> 14 15<h2>C Specification</h2> 16<dl><dd><pre><code> 17#include <revolution/nand.h> 18 19#define NAND_SEEK_SET 0 20#define NAND_SEEK_CUR 1 21#define NAND_SEEK_END 2 22 23typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); 24 25s32 NANDSeekAsync( NANDFileInfo *info, s32 offset, s32 whence, NANDCallback cb, NANDCommandBlock *block ); 26</code></pre></dd></dl> 27 28<h2>Arguments</h2> 29<p> 30<TABLE border="1" > 31 <tr> 32<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>info</EM></STRONG></CODE></TD> 33<TD width="520">Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD> 34 </tr> 35 <tr> 36<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>offset</EM></STRONG></CODE></TD> 37<TD width="520">Specifies the offset value The size is given in bytes.</TD> 38 </tr> 39 <tr> 40<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>whence</EM></STRONG></CODE></TD> 41<TD width="520">Specifies the seek base position. 42 <table border="1" cellspacing="0.1" width="400"> 43 <tr> 44<td width="150"><code>NAND_SEEK_SET</code></td> 45<td>Start of file.</td> 46 </tr> 47 <tr> 48<td width="150"><code>NAND_SEEK_CUR</code></td> 49<td>Current position of file.</td> 50 </tr> 51 <tr> 52<td width="150"><code>NAND_SEEK_END</code></td> 53<td>End of file.</td> 54 </tr> 55 </table> 56 </TD> 57 </tr> 58 <tr> 59<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cb</EM></STRONG></CODE></TD> 60<TD width="520">Callback function to call when this function completes processing.</TD> 61 </tr> 62 <tr> 63<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>block</EM></STRONG></CODE></TD> 64<TD width="520">Command block structure to be passed to the callback function.</TD> 65 </tr> 66</TABLE> 67</p> 68 69<h2>Return Values</h2> 70<p> 71Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally. When the seek is successful, the seek target position is passed to the callback function. 72<p> 73<code>NAND_RESULT_ACCESS<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_INVALID<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code> 74</p> 75</p> 76 77<H2>Description</H2> 78<p> 79Performs a file seek asynchronously. The start position of the next read/write is the <STRONG><EM><code>offset</code></EM></STRONG> plus <STRONG><EM><code>whence</code></EM></STRONG>. If the <STRONG><EM><code>offset</code></EM></STRONG> value is positive, the seek position moves from the base point to the end of the file. If the value is negative, the seek position moves from the base point toward the start of the file. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full. 80</p> 81 82<h2>See Also</h2> 83<p> 84<code><a href="./NANDSeek.html">NANDSeek</a></code>, <code><a href="./NANDRead.html">NANDRead</a></code>, <code><a href="./NANDReadAsync.html">NANDReadAsync</a></code>, <code><a href="./NANDWrite.html">NANDWrite</a></code>, <code><a href="./NANDWriteAsync.html">NANDWriteAsync</a></code> 85</p> 86 87<H2>Revision History</H2> 88<p> 892006/06/16 Initial version.<br> 90</p> 91 92 93<hr> 94<P>CONFIDENTIAL</p> 95</BODY> 96</HTML> 97