PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Tools method

Functions

void SI4735::setI2CLowSpeedMode (void)
 Sets I2C bus to 10kHz.
 
void SI4735::setI2CStandardMode (void)
 Sets I2C bus to 100kHz.
 
void SI4735::setI2CFastMode (void)
 Sets I2C bus to 400kHz.
 
void SI4735::setI2CFastModeCustom (long value=500000)
 Sets the I2C bus to a given value. ATTENTION: use this function with caution.
 
void SI4735::setAudioMuteMcuPin (int8_t pin)
 Sets the Audio Mute Mcu Pin.
 
void SI4735::setHardwareAudioMute (bool on)
 Sets the Hardware Audio Mute.
 
void SI4735::convertToChar (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)
 Converts a number to a char array.
 
void SI4735::removeUnwantedChar (char *str, int size)
 Removes unwanted character from char array.
 

Detailed Description

A set of functions used to support other functions

Function Documentation

◆ setI2CLowSpeedMode()

void SI4735::setI2CLowSpeedMode ( void  )
inline

Sets I2C bus to 10kHz.

The functions below modify the clock frequency for I2C communication. 100kHz is usually the baseline. Use one of these funcition if you have a problem on the default configuration.

◆ setI2CStandardMode()

void SI4735::setI2CStandardMode ( void  )
inline

Sets I2C bus to 100kHz.

◆ setI2CFastMode()

void SI4735::setI2CFastMode ( void  )
inline

Sets I2C bus to 400kHz.

◆ setI2CFastModeCustom()

void SI4735::setI2CFastModeCustom ( long  value = 500000)
inline

Sets the I2C bus to a given value. ATTENTION: use this function with caution.

Parameters
valuein Hz. For example: The values 500000 sets the bus to 500kHz.

◆ setAudioMuteMcuPin()

void SI4735::setAudioMuteMcuPin ( int8_t  pin)
inline

Sets the Audio Mute Mcu Pin.

This function sets the mcu digital pin you want to use to control the external audio mute circuit.

Some users may be uncomfortable with the loud popping of the speaker during some transitions caused by some SI47XX commands.

This problem occurs during the transition from the power down to power up.

For example, when the user changes bands (FM to AM or AM to FM), the Si47XX devices must be powered down and powered up again.

If you have a mute circuit attached to a pin on teh MCU, then you can control the mute circuit from the MCU with this function.

See also
setHardwareAudioMute
Parameters
pinif 0 or greater, sets the MCU digital pin that controls the external circuit.

◆ setHardwareAudioMute()

void SI4735::setHardwareAudioMute ( bool  on)
inline

Sets the Hardware Audio Mute.

Turns the Hardware audio mute on or off

See also
setAudioMuteMcuPin
Parameters
onTrue or false

Referenced by SI4735::powerDown(), SI4735::radioPowerUp(), and SI4735::setup().

◆ convertToChar()

void SI4735::convertToChar ( uint16_t  value,
char *  strValue,
uint8_t  len,
uint8_t  dot,
uint8_t  separator,
bool  remove_leading_zeros = true 
)

Converts a number to a char array.

It is useful to mitigate memory space used by functions like sprintf or other generic similar functions

You can use it to format frequency using decimal or thousand separator and also to convert small numbers.

Parameters
valuevalue to be converted
strValuechar array that will be receive the converted value
lenfinal string size (in bytes)
dotthe decimal or thousand separator position
separatorsymbol "." or ","
remove_leading_zerosif true removes up to two leading zeros (default is true)

◆ removeUnwantedChar()

void SI4735::removeUnwantedChar ( char *  str,
int  size 
)

Removes unwanted character from char array.

replaces non-printable characters to spaces

Parameters
*str- string char array
size- char array size