PMICCloseAsync

Syntax

#include <revolution/pmic.h>

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

PMIC_ERR PMICCloseAsync(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 Either the PMIC library is not initialized, or the Wii Speak cable is not inserted in the USB port.
PMIC_ERR_BUSY The state is in transition. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

Description

Closes the Wii Speak asynchronously.

Once the Wii Speak has been successfully closed, the various microphone operations (setting its operating parameters, starting the microphone, and so on) can no longer be performed. To operate the Wii Speak after it has been closed, you need to reopen the Wii Speak using the PMICOpenAsync or PMICOpen function.

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

PMIC_ERR_OK The Wii Speak has been closed successfully.
PMIC_ERR_NO_DEVICE The Wii Speak has been unplugged.
PMIC_ERR_USB_ERROR An error occurred in USB communications. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

Note: When quitting an application, always call this function (or the PMICClose function).

See Also

PMICOpenAsync
PMICOpen
PMICClose

Revision History

2008/10/22 Added note.
2008/09/25 Revised the return values and callback arguments.
2008/03/04 Changed the function reference format.
2008/01/25 Initial version.


CONFIDENTIAL