PMICGetGain

Syntax

#include <revolution/pmic.h>

// Mic(ADC) Gain
#define PMIC_GAIN_00dB               0x0000
#define PMIC_GAIN_15dB               0x0001
#define PMIC_GAIN_30dB               0x0002
#define PMIC_GAIN_36dB               0x0003

PMIC_ERR PMICGetGain(u16* gain);

Arguments

gain Location to store the gain value received from the Wii Speak.

Return Values

Returns one of the following.

PMIC_ERR_OK The gain has been obtained successfully.
PMIC_ERR_INVALID_ARGUMENTS The correct argument was not passed.
PMIC_ERR_NO_DEVICE The Wii Speak has been unplugged.
PMIC_ERR_INVALID_STATE The Wii Speak is not open.
PMIC_ERR_BUSY Cannot register the command. Call the function again.
PMIC_ERR_USB_ERROR An error occurred in USB communications. Call the function again.
PMIC_ERR_FATAL A fatal error has occurred.

Description

Synchronously gets the gain of the Wii Speak.

This function stores the obtained gain value at the address specified by the gain argument. This function stores PMIC_GAIN_00dB for a gain of +0 dB, PMIC_GAIN_15dB for a gain of +15 dB, PMIC_GAIN_30dB for a gain of +30 dB, or PMIC_GAIN_36dB for a gain of +36 dB. The default gain is PMIC_GAIN_36dB.

See Also

Revision History

2008/10/23 Revised Return Values.
2008/06/09 Initial version.


CONFIDENTIAL