PMICProbe

Syntax

#include <revolution/pmic.h>

PMIC_ERR PMICProbe(void);

Arguments

None.

Return Values

Returns one of the following.

PMIC_ERR_OK The Wii Speak is present.
PMIC_ERR_NO_DEVICE Cannot find the Wii Speak.
PMIC_ERR_INVALID_STATE The PMIC library is not initialized.
PMIC_ERR_FATAL A fatal error has occurred.

Description

Checks whether the Wii Speak connector is inserted in the USB port.

The library prepares to recognize the Wii Speak by calling this function first after calling the PMICInit function. For this reason the following restrictions apply:

In addition, the following actions take some time:

Note: 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.

This function returns PMIC_ERR_NO_DEVICE 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.

This function cannot be called in an interrupt handler or alarm callback.

See Also

PMICInit
PMICOpen
PMICOpenAsync

Revision History

2009/06/17 Added call restrictions.
2009/06/16 Revised a note regarding errors generated when first calling the function.
2009/06/01 Added a caution regarding the error when first calling this function.
2008/09/25 Added text that it is prohibited to call this function in an interrupt handler and the like.
2008/03/04 Changed the function reference format.
2008/01/25 Initial version.


CONFIDENTIAL