PU2CLR SI470X Arduino Library 1.0.1
Arduino Library for Si470X Devices - By Ricardo Lima Caratti
|
Functions | |
void | SI470X::getRdsStatus () |
Gets the RDS registers information. | |
void | SI470X::setRdsMode (uint8_t rds_mode=0) |
Sets the Rds Mode Standard or Verbose. | |
void | SI470X::setRds (bool value) |
Sets the RDS operation. | |
bool | SI470X::getRdsReady () |
Returns true if RDS Ready. | |
uint8_t | SI470X::getRdsFlagAB (void) |
Returns the current Text Flag A/B | |
uint16_t | SI470X::getRdsGroupType () |
Return the group type. | |
uint8_t | SI470X::getRdsVersionCode (void) |
Gets the version code (extracted from the Block B) | |
uint8_t | SI470X::getRdsProgramType (void) |
Returns the Program Type (extracted from the Block B) | |
void | SI470X::getNext2Block (char *c) |
Process data received from group 2B. | |
void | SI470X::getNext4Block (char *c) |
Process data received from group 2A. | |
char * | SI470X::getRdsText (void) |
Gets the RDS Text when the message is of the Group Type 2 version A. | |
char * | SI470X::getRdsText0A (void) |
Gets the station name and other messages. | |
char * | SI470X::getRdsText2A (void) |
Gets the Text processed for the 2A group. | |
char * | SI470X::getRdsText2B (void) |
Gets the Text processed for the 2B group. | |
char * | SI470X::getRdsTime () |
Gets the RDS time and date when the Group type is 4. | |
char * | SI470X::getRdsLocalTime () |
Gets the RDS time converted to local time. | |
bool | SI470X::getRdsAllData (char **stationName, char **stationInformation, char **programInformation, char **utcTime) |
Gets Station Name, Station Information, Program Information and utcTime. | |
void | SI470X::clearRdsBuffer () |
Clear RDS Information (Station Name, Station Information, Program Information and Time) | |
bool | SI470X::getRdsSync () |
Get the Rds Sync. | |
void SI470X::getRdsStatus | ( | ) |
Gets the RDS registers information.
Gets the value of the registers from 0x0A to 0x0F
This function also updates the value of shadowRegisters[0];
Referenced by SI470X::getRdsLocalTime(), SI470X::getRdsText(), SI470X::getRdsText0A(), SI470X::getRdsText2A(), SI470X::getRdsText2B(), and SI470X::getRdsTime().
void SI470X::setRdsMode | ( | uint8_t | rds_mode = 0 | ) |
Sets the Rds Mode Standard or Verbose.
rds_mode | 0 = Standard (default); 1 = Verbose |
void SI470X::setRds | ( | bool | value | ) |
Sets the RDS operation.
Enable or Disable the RDS
true | = turns the RDS ON; false = turns the RDS OFF |
Referenced by SI470X::setRDS().
bool SI470X::getRdsReady | ( | ) |
Returns true if RDS Ready.
Read address 0Ah and check the bit RDSR.
If in verbose mode, the BLERA bits indicate how many errors were corrected in block A. If BLERA indicates 6 or more errors, the data in RDSA should be discarded.
When using the polling method, it is best not to poll continuously. The data will appear in intervals of ~88 ms and the RDSR indicator will be available for at least 40 ms, so a polling rate of 40 ms or less should be sufficient.
ATTENTION: You most call this function before quering other RDS functions. Call it before calling a set of RDS functions.
References SI470X::getStatus().
Referenced by SI470X::getRdsAllData().
uint8_t SI470X::getRdsFlagAB | ( | void | ) |
Returns the current Text Flag A/B
It is useful to check the flag A/B switching.
uint16_t SI470X::getRdsGroupType | ( | ) |
Return the group type.
Please, check if getRdsReady was called before.
uint8_t SI470X::getRdsVersionCode | ( | void | ) |
Gets the version code (extracted from the Block B)
Please, check if getRdsReady was called before.
uint8_t SI470X::getRdsProgramType | ( | void | ) |
Returns the Program Type (extracted from the Block B)
<>
Please, check if getRdsReady was called before.
void SI470X::getNext2Block | ( | char * | c | ) |
Process data received from group 2B.
Please, check if getRdsReady was called before.
c | char array reference to the "group 2B" text |
Referenced by SI470X::getRdsText0A(), and SI470X::getRdsText2B().
void SI470X::getNext4Block | ( | char * | c | ) |
Process data received from group 2A.
Please, check if getRdsReady was called before.
c | char array reference to the "group 2A" text |
Referenced by SI470X::getRdsText(), and SI470X::getRdsText2A().
char * SI470X::getRdsText | ( | void | ) |
Gets the RDS Text when the message is of the Group Type 2 version A.
Please, check if getRdsReady was called before.
References SI470X::getNext4Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2A.
char * SI470X::getRdsText0A | ( | void | ) |
Gets the station name and other messages.
Please, check if getRdsReady was called before.
References SI470X::getNext2Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer0A.
Referenced by SI470X::getRdsAllData().
char * SI470X::getRdsText2A | ( | void | ) |
Gets the Text processed for the 2A group.
@
References SI470X::getNext4Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2A.
Referenced by SI470X::getRdsAllData().
char * SI470X::getRdsText2B | ( | void | ) |
Gets the Text processed for the 2B group.
References SI470X::getNext2Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2B.
Referenced by SI470X::getRdsAllData().
char * SI470X::getRdsTime | ( | ) |
Gets the RDS time and date when the Group type is 4.
References SI470X::getRdsStatus(), and SI470X::rds_time.
Referenced by SI470X::getRdsAllData().
char * SI470X::getRdsLocalTime | ( | ) |
Gets the RDS time converted to local time.
ATTENTION: You must call getRdsReady before calling this function.
ATTENTION: Some stations broadcast wrong time.
References SI470X::getRdsStatus(), and SI470X::rds_time.
bool SI470X::getRdsAllData | ( | char ** | stationName, |
char ** | stationInformation, | ||
char ** | programInformation, | ||
char ** | utcTime | ||
) |
Gets Station Name, Station Information, Program Information and utcTime.
This function populates four char pointer variable parameters with Station Name, Station Information, Programa Information and UTC time.
You must call setRDS(true), setRdsFifo(true) before calling getRdsAllData(...)
ATTENTION: the parameters below are point to point to array of char.
the right way to call this function is shown below.
stationName | (reference) - if NOT NULL, point to Name of the Station (char array - 9 bytes) |
stationInformation | (reference) - if NOT NULL, point to Station information (char array - 33 bytes) |
programInformation | (reference) - if NOT NULL, point to program information (char array - 65 nytes) |
utcTime | (reference) - if NOT NULL, point to char array containing the current UTC time (format HH:MM:SS +HH:MM) |
References SI470X::getRdsReady(), SI470X::getRdsText0A(), SI470X::getRdsText2A(), SI470X::getRdsText2B(), and SI470X::getRdsTime().
void SI470X::clearRdsBuffer | ( | ) |
Clear RDS Information (Station Name, Station Information, Program Information and Time)
Clear the buffer with latest RDS information
References SI470X::rds_buffer0A, SI470X::rds_buffer2A, SI470X::rds_buffer2B, and SI470X::rds_time.
bool SI470X::getRdsSync | ( | ) |
Get the Rds Sync.
Returns true if RDS currently synchronized.
References SI470X::getStatus().