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>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/nand.h&gt;
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</pre></dd></dl>
27
28<h2>Arguments</h2>
29<p>
30<TABLE class="arguments" border="1" >
31  <tr>
32<TH>info</TH>
33<TD>Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD>
34  </tr>
35  <tr>
36<TH>offset</TH>
37<TD>Specifies the offset value The size is given in bytes.</TD>
38  </tr>
39  <tr>
40<TH>whence</TH>
41<TD>Specifies the seek base position.
42        <TABLE class="arguments" border="1" >
43          <tr>
44<th>NAND_SEEK_SET</th>
45<td>Start of file.</td>
46          </tr>
47          <tr>
48<th>NAND_SEEK_CUR</th>
49<td>Current position of file.</td>
50          </tr>
51          <tr>
52<th>NAND_SEEK_END</th>
53<td>End of file.</td>
54          </tr>
55        </table>
56    </TD>
57  </tr>
58  <tr>
59<TH>cb</TH>
60<TD>Callback function to call when this function completes processing.</TD>
61  </tr>
62  <tr>
63<TH>block</TH>
64<TD>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>
71The result codes that <code>NANDSeekAsync</code> can return are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally.
72<p>
73<code>
74NAND_RESULT_OK<br>
75NAND_RESULT_ACCESS<br>
76NAND_RESULT_ALLOC_FAILED<br>
77NAND_RESULT_BUSY<br>
78NAND_RESULT_INVALID<br>
79NAND_RESULT_FATAL_ERROR<br>
80</code>
81</p>
82<p>
83The result codes that may be passed to the callback function are listed below. When the seek is successful, the seek target position is passed to the callback function.
84</p>
85<p>
86<code>
87NAND_RESULT_ACCESS<br>
88NAND_RESULT_INVALID<br>
89NAND_RESULT_UNKNOWN<br>
90NAND_RESULT_FATAL_ERROR<br>
91</code>
92</p>
93</p>
94
95<H2>Description</H2>
96<p>
97Performs a file seek asynchronously. The start position of the next read or write is that indicated by the <SPAN class="argument">whence</SPAN> argument plus the <SPAN class="argument">offset</SPAN> value. If the <SPAN class="argument">offset</SPAN> value is positive, the seek position moves from the base point to the file's end. If the value is negative, the seek position moves from the base point toward the file's start. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full.
98</p>
99
100<h2>See Also</h2>
101<p class="reference">
102<a href="./NANDSeek.html">NANDSeek</a>,
103<a href="./NANDRead.html">NANDRead</a>,
104<a href="./NANDReadAsync.html">NANDReadAsync</a>,
105<a href="./NANDWrite.html">NANDWrite</a>,
106<a href="./NANDWriteAsync.html">NANDWriteAsync</a>
107</p>
108
109<H2>Revision History</H2>
110<p>
1112008/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>
112</p>
113
114<hr><p>CONFIDENTIAL</p></body>
115</html>
116