PMICStartAsync

Syntax

#include <revolution/pmic.h>

typedef void (*PMICCallback)(PMIC_ERR result, void* arg);

PMIC_ERR PMICStartAsync(PMICCallback cb, void* arg);

Arguments

cb Callback function that will send notification of the execution results of this function.
arg Passed as the second argument of the callback function above.

Return Values

Returns one of the following.

PMIC_ERR_OK The function has been called normally.
PMIC_ERR_INVALID_STATE The Wii Speak is not open.
PMIC_ERR_BUSY The state is in transition. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

Description

Starts the Wii Speak asynchronously.

Once the Wii Speak has been started successfully, audio data can be obtained from the Wii Speak microphone.

One of the following is passed to result, the callback function's first argument.

PMIC_ERR_OK The Wii Speak has been started successfully.
PMIC_ERR_NO_DEVICE The Wii Speak has been unplugged.
PMIC_ERR_INVALID_STATE The Wii Speak is not open. (Confirm that the Wii Speak cable is inserted in the USB port.)
PMIC_ERR_USB_ERROR An error occurred in USB communications. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

See Also

Revision History

2008/09/25 Added a callback argument.
2008/03/04 Changed the function reference format.
2008/01/25 Initial version.


CONFIDENTIAL