PMICSetSpStateAsync

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 PMICSetSpStateAsync(u16 state, PMICCallback cb, void* arg);

Arguments

state ON/OFF state of the Wii Speak's signal processor.
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 sets the ON/OFF state of the Wii Speak signal processor.

Specify the state of the signal processor in the state argument. To enable the signal processor, set state to PMIC_SP_ON. To disable the signal processor, set it to PMIC_SP_OFF. When the signal processor is disabled, the echo canceler is disabled so you can get raw data. The default state of the signal processor is PMIC_SP_ON.

This function can be called when the Wii Speak is in the STOP state.

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

PMIC_ERR_OK The signal processor state has been set 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/10/24 Added Description.
2008/07/04 Revised the description of PMIC_ERR_INVALID_STATE.
2008/04/24 Initial version.


CONFIDENTIAL