PMICGetSpStateAsync

Syntax

#include <revolution/pmic.h>

// Signal processing state
#define PMIC_SP_ON                   0x0000
#define PMIC_SP_OFF                  0x0001

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

PMIC_ERR PMICGetSpStateAsync(u16* state, PMICCallback cb, void* arg);

Arguments

state Location to store the signal processor's ON/OFF state, received from the Wii Speak.
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_ARGUMENTS The correct argument was not passed.
PMIC_ERR_INVALID_STATE The Wii Speak is not open.
PMIC_ERR_BUSY Cannot register the command. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

Description

Asynchronously gets the ON/OFF state of the Wii Speak signal processor.

This function stores the obtained state of the signal processor at the address specified by the state argument. If the signal processor is enabled, this function stores PMIC_SP_ON. If the signal processor is disabled, the function stores PMIC_SP_OFF. When the signal processor is disabled, you can get raw data that has not undergone the echo-canceling process. The default state of the signal processor is PMIC_SP_ON.

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

PMIC_ERR_OK The state of the signal processor has been obtained 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

2009/06/11 Revised Description.
2008/12/22 Standardized terminology.
2008/10/23 Revised Description.
2008/04/24 Initial version.


CONFIDENTIAL