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>PMICGetEcResetAsync</title>
9</head>
10
11<body>
12
13<h1>PMICGetEcResetAsync</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/pmic.h&gt;
18
19// Echo Canceller Reset State
20#define PMIC_EC_RESET_ON             0x0001
21#define PMIC_EC_RESET_OFF            0x0000
22
23typedef void (*PMICCallback)(PMIC_ERR result, void* arg);
24
25PMIC_ERR PMICGetEcResetAsync(u16* state, PMICCallback cb, void* arg);
26</pre></dd></dl>
27
28<h2>Arguments</h2>
29<TABLE class="arguments" border="1" >
30  <tr>
31<th><CODE>state</CODE></th>
32<td>Location to store the echo canceler's reset state (ON/OFF), which is received from the Wii Speak.</td>
33  </tr>
34  <tr>
35<th><CODE>cb</CODE></th>
36<td>Callback function that will send notification of the execution results of this function.</td>
37  </tr>
38  <tr>
39<th><CODE>arg</CODE></th>
40<td>Passed as the second argument of the callback function above.</td>
41  </tr>
42</TABLE>
43
44<h2>Return Values</h2>
45<p>
46Returns one of the following.
47</p>
48
49<TABLE class="arguments" border="1">
50  <tr>
51<th><CODE>PMIC_ERR_OK</CODE></th>
52<td>The function has been called normally.</td>
53  </tr>
54  <tr>
55<th><CODE>PMIC_ERR_INVALID_ARGUMENTS</CODE></th>
56<td>The correct argument was not passed.</td>
57  </tr>
58  <tr>
59<th><CODE>PMIC_ERR_INVALID_STATE</CODE></th>
60<td>The Wii Speak is not open.</td>
61  </tr>
62  <tr>
63<th><CODE>PMIC_ERR_BUSY</CODE></th>
64<td>Cannot register the command. Call the function again.</td>
65  </tr>
66  <tr>
67<th><CODE>PMIC_ERR_FATAL</CODE></th>
68<td>A fatal error has occurred.</td>
69  </tr>
70</TABLE>
71
72<H2>Description</H2>
73<p>Asynchronously gets the reset state (ON/OFF) for the Wii Speak's echo canceler.</p>
74
75<p>This function stores the reset state at the address specified by its first argument, <SPAN class="argument">state</SPAN>. A value of <code>PMIC_EC_RESET_ON</code> is stored if resets are enabled, and <code>PMIC_EC_RESET_OFF</code> is stored if resets are disabled. The Wii Speak's echo canceler runs normally when the state is <code>PMIC_EC_RESET_OFF</code>.
76</p>
77
78<p>One of the following is passed to <SPAN class="argument">result</SPAN>, the callback function's first argument.</p>
79
80<TABLE class="arguments" border="1" >
81  <tr>
82<th><CODE>PMIC_ERR_OK</CODE></th>
83<td>The reset state was obtained successfully.</td>
84  </tr>
85  <tr>
86<th><CODE>PMIC_ERR_NO_DEVICE</CODE></th>
87<td>The Wii Speak has been unplugged.</td>
88  </tr>
89  <tr>
90<th><CODE>PMIC_ERR_INVALID_STATE</CODE></th>
91<td>The Wii Speak is not open. (Confirm that the Wii Speak cable is inserted in the USB port.)</td>
92  </tr>
93  <tr>
94<th><CODE>PMIC_ERR_USB_ERROR</CODE></th>
95<td>An error occurred in USB communications. Call the function again.</td>
96  </tr>
97  <tr>
98<th><CODE>PMIC_ERR_FATAL</CODE></th>
99<td>A fatal error has occurred.</td>
100  </tr>
101</TABLE>
102
103<H2>See Also</H2>
104
105<H2>Revision History</H2>
106<p>
1072008/12/22 Standardized terminology.<br>2008/10/24 Revised <B>Description</B>. <br>2008/10/23 Revised <B>Description</B>. <br>2008/10/22 Initial version.
108</p>
109
110<hr><p>CONFIDENTIAL</p></body>
111
112</html>
113