PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
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. | |
A set of functions used to support other functions
|
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.
|
inline |
Sets I2C bus to 100kHz.
|
inline |
Sets I2C bus to 400kHz.
|
inline |
Sets the I2C bus to a given value. ATTENTION: use this function with caution.
value | in Hz. For example: The values 500000 sets the bus to 500kHz. |
|
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.
pin | if 0 or greater, sets the MCU digital pin that controls the external circuit. |
|
inline |
Sets the Hardware Audio Mute.
Turns the Hardware audio mute on or off
on | True or false |
Referenced by SI4735::powerDown(), SI4735::radioPowerUp(), and SI4735::setup().
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.
value | value to be converted |
strValue | char array that will be receive the converted value |
len | final string size (in bytes) |
dot | the decimal or thousand separator position |
separator | symbol "." or "," |
remove_leading_zeros | if true removes up to two leading zeros (default is true) |
void SI4735::removeUnwantedChar | ( | char * | str, |
int | size | ||
) |
Removes unwanted character from char array.
replaces non-printable characters to spaces
*str | - string char array |
size | - char array size |