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=utf-8"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<title>PMICProbe</title> 9</head> 10 11<body> 12 13<h1>PMICProbe</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/pmic.h> 18 19PMIC_ERR PMICProbe(void); 20</pre></dd></dl> 21 22<h2>Arguments</h2> 23<p>None.</p> 24 25<h2>Return Values</h2> 26<p> 27Returns one of the following. 28</p> 29 30<TABLE class="arguments" border="1" > 31 <tr> 32<th>PMIC_ERR_OK</th> 33<td>The Wii Speak is present.</td> 34 </tr> 35 <tr> 36<th>PMIC_ERR_NO_DEVICE</th> 37<td>Cannot find the Wii Speak.</td> 38 </tr> 39 <tr> 40<th>PMIC_ERR_INVALID_STATE</th> 41<td>The PMIC library is not initialized.</td> 42 </tr> 43 <tr> 44<th>PMIC_ERR_FATAL</th> 45<td>A fatal error has occurred.</td> 46 </tr> 47</TABLE> 48 49<H2>Description</H2> 50<p>Checks whether the Wii Speak connector is inserted in the USB port.</p> 51 52<p>The library prepares to recognize the Wii Speak by calling this function first after calling the <code>PMICInit</code> function. For this reason the following restrictions apply:</p> 53<ul> 54<li>After calling the <code>PMICInit</code> function, always call this function once before calling the <code>PMICOpen</code> or <code>PMICOpenAsync</code> function. 55<li>When this function is first called immediately after calling the <code>PMICInit</code> function, <code>PMIC_ERR_NO_DEVICE</code> is returned even if the Wii Speak is connected. 56</ul> 57 58<p></p> 59 60<p>In addition, the following actions take some time:</p> 61 62<ul> 63<li>For a Wii Speak, already connected to the console, to be recognized after the library prepares to do so. 64<li>For the library to actually recognize the Wii Speak once it has been connected to the console. 65</ul> 66 67<p><B>Note:</B> The amount of time required to recognize the Wii Speak varies depending on how it is connected. For example, times can vary when the Wii Speak is connected via a USB hub, or if there are other USB devices connected to the console.<br><br>This function returns <code>PMIC_ERR_NO_DEVICE</code> until the Wii Speak is recognized. When that value is returned, try waiting a while (for example, after one video frame) before trying to call this function again.</p> 68 69<p>This function cannot be called in an interrupt handler or alarm callback.</p> 70 71<H2>See Also</H2> 72<p class="reference"> 73<a href="PMICInit.html"><CODE>PMICInit</CODE></a><BR> <a href="PMICOpen.html"><CODE>PMICOpen</CODE></a><BR> <a href="PMICOpenAsync.html"><CODE>PMICOpenAsync</CODE></a> 74</p> 75 76<H2>Revision History</H2> 77<p> 782009/06/17 Added call restrictions.<br>2009/06/16 Revised a note regarding errors generated when first calling the function.<br>2009/06/01 Added a caution regarding the error when first calling this function.<br>2008/09/25 Added text that it is prohibited to call this function in an interrupt handler and the like.<br>2008/03/04 Changed the function reference format.<br>2008/01/25 Initial version. 79</p> 80 81<hr><p>CONFIDENTIAL</p></body> 82 83</html> 84