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>HIO2Write</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">HIO2Write</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/hio2.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>BOOL    HIO2Write ( HIO2Handle handle, u32 addr, const void* buffer, s32 size );</CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" cellpadding="3" cellspacing="0.1">
21  <TBODY>
22    <TR>
23<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>handle</CODE></STRONG></EM> &nbsp;&nbsp;</TD>
24<TD width="520">Handle retrieved using the <CODE>HI02Open</CODE> function.</TD>
25    </TR>
26    <TR>
27<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>addr</CODE></STRONG></EM> &nbsp;&nbsp;</TD>
28<TD width="520">Write address of the EXI-USB interface shared memory. This address must be 4-byte aligned.</TD>
29    </TR>
30    <TR>
31<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>buffer</CODE></STRONG></EM> &nbsp;&nbsp;</TD>
32<TD width="520">Pointer to the buffer where the write data is set. This address must be 32-byte aligned.</TD>
33    </TR>
34    <TR>
35<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>size</CODE></STRONG></EM> &nbsp;&nbsp;</TD>
36<TD width="520">Data size to write. Must be a multiple of 32 bytes.</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40<H2>Return Values</H2>
41<P>Returns <CODE>TRUE</CODE> if write succeeds; otherwise returns <CODE>FALSE</CODE>.</P>
42<H2>Description</H2>
43<P>The <CODE>HIO2Write</CODE> function writes the amount of data <EM><STRONG><CODE>size</CODE></STRONG></EM> from the specified <EM><STRONG><CODE>buffer</CODE></STRONG></EM> to the start address <CODE><EM><STRONG>addr</STRONG></EM></CODE> in shared memory. This function blocks until all data is written.</P>
44<p>
45This 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>.
46</p>
47<H2>See Also</H2>
48<H2>Revision History</H2>
49<P>2007/09/25 Added information on the sleep status of threads.<br>2006/03/01 Initial version.</P>
50<hr><p>CONFIDENTIAL</p></body>
51</HTML>