PU2CLR SI4844 Arduino Library 1.1.8
Arduino Library for Si4844 Devices - By Ricardo Lima Caratti
|
Functions | |
void | SI4844::convertToChar (uint32_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. | |
bool | SI4844::detectDevice () |
Checks communication with SI4844 via I2C. | |
char * | SI4844::getFormattedFrequency (uint8_t removeRightDigit=0, uint8_t thousandsSeparator=',') |
Gets Formatted Frequency. | |
uint8_t | SI4844::scanI2CBus (uint8_t *device, uint8_t limit) |
Scans the I2C bus and returns the addresses of the devices found. | |
void SI4844::convertToChar | ( | uint32_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) |
bool SI4844::detectDevice | ( | ) |
char * SI4844::getFormattedFrequency | ( | uint8_t | removeRightDigit = 0 , |
uint8_t | thousandsSeparator = ',' |
||
) |
Gets Formatted Frequency.
Gets the currente frequency of the receiver and return a point to char (string) with the formatted frequency
removeRightDigit | number of less significant digits to be removed (FM mode only) |
uint8_t SI4844::scanI2CBus | ( | uint8_t * | device, |
uint8_t | limit | ||
) |
Scans the I2C bus and returns the addresses of the devices found.
Searches for devices connected to the I2C bus. The addresses of the devices found are stored in the "device" array.
device | array of device addresses found. |