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>PMICStartAsync</title>
9</head>
10
11<body>
12
13<h1>PMICStartAsync</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/pmic.h&gt;
18
19typedef void (*PMICCallback)(PMIC_ERR result, void* arg);
20
21PMIC_ERR PMICStartAsync(PMICCallback cb, void* arg);
22</pre></dd></dl>
23
24<h2>Arguments</h2>
25<TABLE class="arguments" border="1" >
26  <tr>
27<th>cb</th>
28<td>Callback function that will send notification of the execution results of this function.</td>
29  </tr>
30  <tr>
31<th>arg</th>
32<td>Passed as the second argument of the callback function above.</td>
33  </tr>
34</table>
35
36<h2>Return Values</h2>
37<p>
38Returns one of the following.
39</p>
40
41<TABLE class="arguments" border="1" >
42  <tr>
43<th>PMIC_ERR_OK</th>
44<td>The function has been called normally.</td>
45  </tr>
46  <tr>
47<th>PMIC_ERR_INVALID_STATE</th>
48<td>The Wii Speak is not open.</td>
49  </tr>
50  <tr>
51<th>PMIC_ERR_BUSY</th>
52<td>The state is in transition. Call the function again.</td>
53  </tr>
54  <tr>
55<th>PMIC_ERR_FATAL</th>
56<td>A fatal error has occurred.</td>
57  </tr>
58</TABLE>
59
60<H2>Description</H2>
61<p>Starts the Wii Speak asynchronously.</p>
62
63<p>Once the Wii Speak has been started successfully, audio data can be obtained from the Wii Speak microphone.</p>
64
65<p>One of the following is passed to <SPAN class="argument">result</SPAN>, the callback function's first argument.</p>
66
67<TABLE class="arguments" border="1" >
68  <tr>
69<th>PMIC_ERR_OK</th>
70<td>The Wii Speak has been started successfully.</td>
71  </tr>
72  <tr>
73<th>PMIC_ERR_NO_DEVICE</th>
74<td>The Wii Speak has been unplugged.</td>
75  </tr>
76  <tr>
77<th>PMIC_ERR_INVALID_STATE</th>
78<td>The Wii Speak is not open. (Confirm that the Wii Speak cable is inserted in the USB port.)</td>
79  </tr>
80  <tr>
81<th>PMIC_ERR_USB_ERROR</th>
82<td>An error occurred in USB communications. Call the function again.</td>
83  </tr>
84  <tr>
85<th>PMIC_ERR_FATAL</th>
86<td>A fatal error has occurred.</td>
87  </tr>
88</TABLE>
89
90<H2>See Also</H2>
91<p class="reference">
92</p>
93
94<H2>Revision History</H2>
95<p>
962008/09/25 Added a callback argument.<br>2008/03/04 Changed the function reference format.<br>2008/01/25 Initial version.
97</p>
98<hr><p>CONFIDENTIAL</p></body>
99</html>