SGTL5000Class Class
SGTL5000Class Class
Description
A class of SGTL5000Class.
Syntax
class SGTL5000Class
Members
Public Constructors | |
SGTL5000Class::SGTL5000Class | Constructs a SGTL5000Class object. |
SGTL5000Class::~SGTL5000Class | Destructs a SGTL5000Class object. |
Public Methods | |
SGTL5000Class::begin | Initialize Audio Codec, SGTL5000. |
SGTL5000Class::muteHeadphone | Mute the headphone. |
SGTL5000Class::unmuteHeadphone | Unmute the headphone. |
SGTL5000Class::muteLineout | Mute the line out. |
SGTL5000Class::unmuteLineout | Unmute the line out. |
SGTL5000Class::inputSelect | Select the input type. |
SGTL5000Class::setVolume | Set the volume. |
SGTL5000Class::micGain | Set the gain of the MIC in dB. |
SGTL5000Class::begin
Description
Initialize Audio Codec, SGTL5000.
Syntax
uint8_t begin(void);
Parameters
NA
Returns
This function returns “0” if it begins successfully and SGTL5000 is enabled.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::muteHeadphone
Description
Mute the headphone.
Syntax
uint8_t muteHeadphone(void);
Parameters
NA
Returns
This function returns “0” if the headphone is muted successfully else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::unmuteHeadphone
Description
Unmute the headphone.
Syntax
uint8_t unmuteHeadphone(void);
Parameters
NA
Returns
This function returns “0” if the headphone is unmuted successfully else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::muteLineout
Description
Mute the line out.
Syntax
uint8_t muteLineout(void);
Parameters
NA
Returns
This function returns “0” if lineout is muted successfully, else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::unmuteLineout
Description
Unmute the line out.
Syntax
uint8_t unmuteLineout(void);
Parameters
NA
Returns
This function returns “0” if lineout is unmuted successfully, else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::inputSelect
Description
Select the input type.
Syntax
uint8_t inputSelect(uint8_t type);
Parameters
type: “0”: input inline; “1”: input MIC.
Returns
This function returns “0” if input type is either inline or MIC, else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::setVolume
Description
Set the volume.
Syntax
uint8_t setVolume(float val);
Parameters
val: a float value indicates the volume.
The range is of val is “0 < (val * 129 + 0.499) < 128”.
Returns
This function returns “0” if volume is set successfully, else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.
SGTL5000Class::micGain
Description
Set the gain of the MIC in dB.
Syntax
uint8_t micGain(uint16_t dB);
Parameters
dB: The value of gain in dB.
Returns
This function returns “0” if gain of the mic is set successfully in dB, else return “1”.
Example Code
NA
Notes and Warnings
“AmebaSGTL5000.h” must be included to use the class function.