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 offset is specified 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 base position for the seek. 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 in the 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">Specifies the 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">Specifies the command block structure to pass 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. If the seek is successful, the position in the file after the seek 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 starting position of the next read or 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 towards the end of the file. If the value is negative, the seek position moves from the base point towards the start of the file. If the queue receiving the request is full in the library, this function call is refused and <code>NAND_RESULT_BUSY</code> is returned. 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>06/16/2006 Initial version.</p> 89 90 91</body> 92</html> 93