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>PMICGetGain</title>
9</head>
10
11<body>
12
13<h1>PMICGetGain</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/pmic.h&gt;
18
19// Mic(ADC) Gain
20#define PMIC_GAIN_00dB               0x0000
21#define PMIC_GAIN_15dB               0x0001
22#define PMIC_GAIN_30dB               0x0002
23#define PMIC_GAIN_36dB               0x0003
24
25PMIC_ERR PMICGetGain(u16* gain);
26</pre></dd></dl>
27
28<h2>Arguments</h2>
29<TABLE class="arguments" border="1" >
30  <tr>
31<th>gain</th>
32<td>Location to store the gain value received from the Wii Speak.</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 gain has been obtained successfully.</td>
45  </tr>
46  <tr>
47<th>PMIC_ERR_INVALID_ARGUMENTS</th>
48<td>The correct argument was not passed.</td>
49  </tr>
50  <tr>
51<th>PMIC_ERR_NO_DEVICE</th>
52<td>The Wii Speak has been unplugged.</td>
53  </tr>
54  <tr>
55<th>PMIC_ERR_INVALID_STATE</th>
56<td>The Wii Speak is not open.</td>
57  </tr>
58  <tr>
59<th>PMIC_ERR_BUSY</th>
60<td>Cannot register the command. Call the function again.</td>
61  </tr>
62  <tr>
63<th>PMIC_ERR_USB_ERROR</th>
64<td>An error occurred in USB communications. Call the function again.</td>
65  </tr>
66  <tr>
67<th>PMIC_ERR_FATAL</th>
68<td>A fatal error has occurred.</td>
69  </tr>
70</TABLE>
71
72<H2>Description</H2>
73<p>Synchronously gets the gain of the Wii Speak.</p>
74
75<p>This function stores the obtained gain value at the address specified by the <SPAN class="argument">gain</SPAN> argument. This function stores <code>PMIC_GAIN_00dB</code> for a gain of +0 dB, <code>PMIC_GAIN_15dB</code> for a gain of +15 dB, <code>PMIC_GAIN_30dB</code> for a gain of +30 dB, or <code>PMIC_GAIN_36dB</code> for a gain of +36 dB. The default gain is <code>PMIC_GAIN_36dB</code>.</p>
76
77<H2>See Also</H2>
78
79<H2>Revision History</H2>
80<p>
812008/10/23 Revised <B>Return Values</B>.<br>2008/06/09 Initial version.
82</p>
83<hr><p>CONFIDENTIAL</p></body>
84</html>