PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
Functions | |
uint8_t | SI4735::getCurrentVolume () |
Get the Current Volume. | |
void | SI4735::setVolumeUp () |
Set the Volume Up. | |
void | SI4735::setVolumeDown () |
Set the Volume Down. | |
void | SI4735::setAudioMode (uint8_t audioMode) |
Sets the Audio Mode. See table below. | |
void | SI4735::setAmDelayNB (uint16_t value) |
Sets the delay before applying impulse blanking. | |
void | SI4735::digitalOutputFormat (uint8_t OSIZE, uint8_t OMONO, uint8_t OMODE, uint8_t OFALL) |
Configures the digital audio output format. | |
void | SI4735::digitalOutputSampleRate (uint16_t DOSR) |
Enables digital audio output and configures digital audio output sample rate in samples per second (sps). | |
void | SI4735::setVolume (uint8_t volume) |
Sets volume level (0 to 63) | |
void | SI4735::setAudioMute (bool off) |
Sets the audio on or off. | |
uint8_t | SI4735::getVolume () |
Gets the current volume level. | |
void | SI4735::volumeUp () |
Set sound volume level Up. | |
void | SI4735::volumeDown () |
Set sound volume level Down. | |
|
inline |
Get the Current Volume.
Returns the current volume level.
|
inline |
|
inline |
|
inline |
Sets the Audio Mode. See table below.
If you want to change the audio mode, call this function before call setAM(), setFM() or setSSB().
Sets the Si47XX device to use ANALOG or DIGITAL audio output. The table below shows the valid values.
This function will only take effect after calling setAM(), setFM() or setSSB().
Macro | Value (Binary) | Description |
---|---|---|
SI473X_ANALOG_AUDIO | 0b00000101 | Analog Audio Inputs |
SI473X_DIGITAL_AUDIO1 | 0b00001011 | Digital audio output (DCLK, LOUT/DFS, ROUT/DIO) |
SI473X_DIGITAL_AUDIO2 | 0b10110000 | Digital audio outputs (DCLK, DFS, DIO) |
SI473X_DIGITAL_AUDIO3 | 0b10110101 | Analog and digital audio outputs (LOUT/ROUT and DCLK, DFS,DIO) |
audioMode | One of the values options above |
|
inline |
Sets the delay before applying impulse blanking.
Delay in micro-seconds before applying impulse blanking to the original samples. Default value is 172.
value | Delay in micro-seconds |
void SI4735::digitalOutputFormat | ( | uint8_t | OSIZE, |
uint8_t | OMONO, | ||
uint8_t | OMODE, | ||
uint8_t | OFALL | ||
) |
Configures the digital audio output format.
Options: DCLK edge, data format, force mono, and sample precision.
ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.
uint8_t | OSIZE Dgital Output Audio Sample Precision (0=16 bits, 1=20 bits, 2=24 bits, 3=8bits). |
uint8_t | OMONO Digital Output Mono Mode (0=Use mono/stereo blend ). |
uint8_t | OMODE Digital Output Mode (0=I2S, 6 = Left-justified, 8 = MSB at second DCLK after DFS pulse, 12 = MSB at first DCLK after DFS pulse). |
uint8_t | OFALL Digital Output DCLK Edge (0 = use DCLK rising edge, 1 = use DCLK falling edge) |
void SI4735::digitalOutputSampleRate | ( | uint16_t | DOSR | ) |
Enables digital audio output and configures digital audio output sample rate in samples per second (sps).
When DOSR[15:0] is 0, digital audio output is disabled. The over-sampling rate must be set in order to
satisfy a minimum DCLK of 1 MHz. To enable digital audio output, program DOSR[15:0] with the sample rate
in samples per second. The system controller must establish DCLK and DFS prior to enabling the digital
audio output else the device will not respond and will require reset. The sample rate must be set to 0
before the DCLK/DFS is removed. FM_TUNE_FREQ command must be sent after the POWER_UP command to start
the internal clocking before setting this property.
ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.
uint16_t | DOSR Digital Output Sample Rate(32–48 ksps .0 to disable digital audio output). |
void SI4735::setVolume | ( | uint8_t | volume | ) |
Sets volume level (0 to 63)
uint8_t | volume (domain: 0 - 63) |
void SI4735::setAudioMute | ( | bool | off | ) |
Sets the audio on or off.
Useful to mute the audio output of the SI47XX device. This function does not work to reduce the pop in the speaker at start the system up.
If you want to remove the loud click or pop in the speaker at start, power down and power up commands, use setHardwareAudioMute with a external mute circuit.
value | if true, mute the audio; if false unmute the audio. |
uint8_t SI4735::getVolume | ( | ) |
void SI4735::volumeUp | ( | ) |
void SI4735::volumeDown | ( | ) |