1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>HIO2Read</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">HIO2Read</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">#include &lt;revolution/hio2.h&gt;
15
16BOOL    HIO2Read ( HIO2Handle handle, u32 addr, void* buffer, s32 size );
17</pre></dd></dl>
18
19<H2>Arguments</H2>
20<TABLE class="arguments" border="1" >
21  <TBODY>
22    <TR>
23<TH>handle</TH>
24<TD>Handle retrieved using the <CODE>HIO2Open</CODE> function.</TD>
25    </TR>
26    <TR>
27<TH>addr</TH>
28<TD>Read address of shared memory for the EXI-USB interface. Must be 4-byte aligned.</TD>
29    </TR>
30    <TR>
31<TH>buffer</TH>
32<TD>Pointer to the buffer that stores the data to read. Must be 32-byte aligned.</TD>
33    </TR>
34    <TR>
35<TH>size</TH>
36<TD>Size of the data to read. Must be a multiple of 32 bytes.</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40
41<H2>Return Values</H2>
42<P>Returns <CODE>TRUE</CODE> if read succeeds and <CODE>FALSE</CODE> otherwise.</P>
43
44<H2>Description</H2>
45<P>The <CODE>HIO2Read</CODE> function reads the amount of data <SPAN class="argument">size</SPAN> from the start address <SPAN class="argument">addr</SPAN> in the specified shared memory and then stores the data in <SPAN class="argument">buffer</SPAN>. Data are read in 4-byte increments. This function blocks until all data is read.</P>
46<p>
47This function may put the current thread to sleep. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
48</p>
49<H2>See Also</H2>
50<p>None.</p>
51
52<H2>Revision History</H2>
53<P>
542007/09/25 Added information on the sleep status of threads.<br>2006/03/01 Initial version.<br>
55</P>
56
57<hr><p>CONFIDENTIAL</p></body>
58</HTML>