|
char * | RDA5807::formatFrequency (uint16_t value, char *strValue, char decimalSeparator) |
| Convert a numeric frequency to a formated string (char *) frequency.
|
|
char * | RDA5807::formatCurrentFrequency (char decimalSeparator=',') |
| Convert the current frequency to a formated string (char *) frequency.
|
|
void | RDA5807::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.
|
|
int | RDA5807::checkI2C (uint8_t *addressArray) |
| Check the I2C bus address.
|
|
A set of functions used to support other functions
◆ checkI2C()
int RDA5807::checkI2C |
( |
uint8_t * |
addressArray | ) |
|
Check the I2C bus address.
- Parameters
-
uint8_t | address Array - this array will be populated with the I2C bus addresses found (minimum three elements) |
- Returns
- 0 if no i2c device is found; -1 if error is found or n > 0, where n is the number of I2C bus address found
◆ convertToChar()
void RDA5807::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 othetr generic similar functions
You can use it to format frequency using decimal or tousand separator and also to convert smalm numbers.
- Parameters
-
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 tousand separator position |
separator | symbol "." or "," |
remove_leading_zeros | if true removes up to two leading zeros (default is true) |
◆ formatCurrentFrequency()
char * RDA5807::formatCurrentFrequency |
( |
char |
decimalSeparator = ',' | ) |
|
|
inline |
Convert the current frequency to a formated string (char *) frequency.
The current frequency is the latest setted frequency by setFrequency, seek, setFrequencyUp and setFrequencyDown.
- Parameters
-
char | decimalSeparator - the symbol that separates the decimal part (Exe: . or ,) |
- Returns
- point char string strFrequency (member variable)
- See also
- setFrequency, seek, setFrequencyUp and setFrequencyDown
References RDA5807::strFrequency.
◆ formatFrequency()
char * RDA5807::formatFrequency |
( |
uint16_t |
value, |
|
|
char * |
strValue, |
|
|
char |
decimalSeparator |
|
) |
| |
|
inline |
Convert a numeric frequency to a formated string (char *) frequency.
- Parameters
-
uint16_t | value - A given frequency to be formated |
char | *strValue - Formated frequency (Exe: 103,90) - Array of char ( minimal 7 elements ) |
char | decimalSeparator - the symbol that separates the decimal part (Exe: . or ,) |
- Returns
- point of strValue