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>PMICGetFreq</title>
9</head>
10
11<body>
12
13<h1>PMICGetFreq</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/pmic.h&gt;
18
19// Sampling Frequency
20#define PMIC_FREQ_8KHZ               0x0000
21#define PMIC_FREQ_11KHZ              0x0001
22#define PMIC_FREQ_RESERVED           0x0002
23#define PMIC_FREQ_16KHZ              0x0003
24
25PMIC_ERR PMICGetFreq(u16* freq);
26</pre></dd></dl>
27
28<h2>Arguments</h2>
29<TABLE class="arguments" border="1" >
30  <tr>
31<th>freq</th>
32<td>Location for storing the sampling frequency of the audio data 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 sampling frequency has been successfully obtained.</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 sampling frequency of the audio data received from the Wii Speak.</p>
74
75<p>This function stores the obtained sampling frequency at the address specified by the <SPAN class="argument">freq</SPAN> argument. The function stores <code>PMIC_FREQ_8KHZ</code> for a sampling frequency of 8000 Hz; <code>PMIC_FREQ_11KHZ</code> for a sampling frequency of 11,025 Hz; or <code>PMIC_FREQ_16KHZ</code> for a sampling frequency of 16,000 Hz. The default sampling frequency is <code>PMIC_FREQ_16KHZ</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/04/18 Initial version.
82</p>
83<hr><p>CONFIDENTIAL</p></body>
84</html>