![]() |
PU2CLR Si4735 Arduino Library
2.0.7
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
Functions | |
bool | SI4735::getRdsReceived () |
Get the Rds Received FIFO. More... | |
bool | SI4735::getRdsSyncLost () |
Get the Rds Sync Lost object. More... | |
bool | SI4735::getRdsSyncFound () |
Get the Rds Sync Found. More... | |
bool | SI4735::getRdsNewBlockA () |
Get the Rds New Block A. More... | |
bool | SI4735::getRdsNewBlockB () |
Get the Rds New Block B. More... | |
bool | SI4735::getRdsSync () |
Get the Rds Sync. More... | |
bool | SI4735::getGroupLost () |
Get the Group Lost. More... | |
void | SI4735::RdsInit () |
Starts the control member variables for RDS. More... | |
void | SI4735::clearRdsBuffer2A () |
Clear RDS buffer 2A (text) More... | |
void | SI4735::clearRdsBuffer2B () |
Clear RDS buffer 2B (text) More... | |
void | SI4735::clearRdsBuffer0A () |
Clear RDS buffer 0A (text) More... | |
void | SI4735::setRdsConfig (uint8_t RDSEN, uint8_t BLETHA, uint8_t BLETHB, uint8_t BLETHC, uint8_t BLETHD) |
Sets RDS property. More... | |
void | SI4735::setRdsIntSource (uint8_t RDSNEWBLOCKB, uint8_t RDSNEWBLOCKA, uint8_t RDSSYNCFOUND, uint8_t RDSSYNCLOST, uint8_t RDSRECV) |
Configures interrupt related to RDS. More... | |
void | SI4735::getRdsStatus (uint8_t INTACK, uint8_t MTFIFO, uint8_t STATUSONLY) |
Gets the RDS status. Store the status in currentRdsStatus member. RDS COMMAND FM_RDS_STATUS. More... | |
void | SI4735::getRdsStatus () |
Gets RDS Status. More... | |
uint16_t | SI4735::getRdsPI (void) |
Returns the programa type. More... | |
uint8_t | SI4735::getRdsGroupType (void) |
Returns the Group Type (extracted from the Block B) More... | |
uint8_t | SI4735::getRdsFlagAB (void) |
Returns the current Text Flag A/B More... | |
uint8_t | SI4735::getRdsTextSegmentAddress (void) |
Returns the address of the text segment. More... | |
uint8_t | SI4735::getRdsVersionCode (void) |
Gets the version code (extracted from the Block B) More... | |
uint8_t | SI4735::getRdsProgramType (void) |
Returns the Program Type (extracted from the Block B) More... | |
void | SI4735::getNext2Block (char *) |
Process data received from group 2B. More... | |
void | SI4735::getNext4Block (char *) |
Process data received from group 2A. More... | |
char * | SI4735::getRdsText (void) |
Gets the RDS Text when the message is of the Group Type 2 version A. More... | |
char * | SI4735::getRdsText0A (void) |
Gets the station name and other messages. More... | |
char * | SI4735::getRdsText2A (void) |
Gets the Text processed for the 2A group. More... | |
char * | SI4735::getRdsText2B (void) |
Gets the Text processed for the 2B group. More... | |
char * | SI4735::getRdsTime (void) |
Gets the RDS time and date when the Group type is 4. More... | |
|
inline |
Get the Rds Received FIFO.
if FIFO is 1, it means the minimum number of groups was filled
Referenced by SI4735::getRdsPI(), SI4735::getRdsText0A(), and SI4735::getRdsText2A().
|
inline |
Get the Rds Sync Lost object.
returns true (1) if Lost RDS synchronization is detected.
|
inline |
Get the Rds Sync Found.
return true if found RDS synchronization
|
inline |
Get the Rds New Block A.
Returns true if valid Block A data has been received.
Referenced by SI4735::getRdsPI().
|
inline |
Get the Rds New Block B.
Returns true if valid Block B data has been received.
|
inline |
Get the Rds Sync.
Returns true if RDS currently synchronized.
|
inline |
Get the Group Lost.
Returns true if one or more RDS groups discarded due to FIFO overrun.
void SI4735::RdsInit | ( | ) |
Starts the control member variables for RDS.
RDS implementation
This method is called by setRdsConfig()
References SI4735::clearRdsBuffer0A(), SI4735::clearRdsBuffer2A(), and SI4735::clearRdsBuffer2B().
Referenced by SI4735::setRdsConfig().
|
protected |
Clear RDS buffer 2A (text)
References SI4735::rds_buffer2A.
Referenced by SI4735::getRdsStatus(), and SI4735::RdsInit().
|
protected |
Clear RDS buffer 2B (text)
References SI4735::rds_buffer2B.
Referenced by SI4735::getRdsStatus(), and SI4735::RdsInit().
|
protected |
Clear RDS buffer 0A (text)
References SI4735::rds_buffer0A.
Referenced by SI4735::getRdsStatus(), and SI4735::RdsInit().
void SI4735::setRdsConfig | ( | uint8_t | RDSEN, |
uint8_t | BLETHA, | ||
uint8_t | BLETHB, | ||
uint8_t | BLETHC, | ||
uint8_t | BLETHD | ||
) |
Sets RDS property.
Configures RDS settings to enable RDS processing (RDSEN) and set RDS block error thresholds.
When a RDS Group is received, all block errors must be less than or equal the associated block error threshold for the group to be stored in the RDS FIFO.
IMPORTANT: All block errors must be less than or equal the associated block error threshold for the group to be stored in the RDS FIFO.
Value | Description |
---|---|
0 | No errors |
1 | 1–2 bit errors detected and corrected |
2 | 3–5 bit errors detected and corrected |
3 | Uncorrectable |
Recommended Block Error Threshold options:
Exemples | Description |
---|---|
2,2,2,2 | No group stored if any errors are uncorrected |
3,3,3,3 | Group stored regardless of errors |
0,0,0,0 | No group stored containing corrected or uncorrected errors |
3,2,3,3 | Group stored with corrected errors on B, regardless of errors on A, C, or D |
uint8_t | RDSEN RDS Processing Enable; 1 = RDS processing enabled. |
uint8_t | BLETHA Block Error Threshold BLOCKA. |
uint8_t | BLETHB Block Error Threshold BLOCKB. |
uint8_t | BLETHC Block Error Threshold BLOCKC. |
uint8_t | BLETHD Block Error Threshold BLOCKD. |
References SI4735::RdsInit(), and SI4735::waitToSend().
void SI4735::setRdsIntSource | ( | uint8_t | RDSNEWBLOCKB, |
uint8_t | RDSNEWBLOCKA, | ||
uint8_t | RDSSYNCFOUND, | ||
uint8_t | RDSSYNCLOST, | ||
uint8_t | RDSRECV | ||
) |
Configures interrupt related to RDS.
Use this method if want to use interrupt
RDSRECV | If set, generate RDSINT when RDS FIFO has at least FM_RDS_INT_FIFO_COUNT entries. |
RDSSYNCLOST | If set, generate RDSINT when RDS loses synchronization. |
RDSSYNCFOUND | set, generate RDSINT when RDS gains synchronization. |
RDSNEWBLOCKA | If set, generate an interrupt when Block A data is found or subsequently changed |
RDSNEWBLOCKB | If set, generate an interrupt when Block B data is found or subsequently changed |
References SI4735::waitToSend().
void SI4735::getRdsStatus | ( | uint8_t | INTACK, |
uint8_t | MTFIFO, | ||
uint8_t | STATUSONLY | ||
) |
Gets the RDS status. Store the status in currentRdsStatus member. RDS COMMAND FM_RDS_STATUS.
INTACK | Interrupt Acknowledge; 0 = RDSINT status preserved. 1 = Clears RDSINT. |
MTFIFO | 0 = If FIFO not empty, read and remove oldest FIFO entry; 1 = Clear RDS Receive FIFO. |
STATUSONLY | Determines if data should be removed from the RDS FIFO. |
References SI4735::clearRdsBuffer0A(), SI4735::clearRdsBuffer2A(), SI4735::clearRdsBuffer2B(), and SI4735::waitToSend().
void SI4735::getRdsStatus | ( | ) |
Gets RDS Status.
Same result of calling getRdsStatus(0,0,0).
Please, call getRdsStatus(uint8_t INTACK, uint8_t MTFIFO, uint8_t STATUSONLY) instead getRdsStatus() if you want other behaviour.
uint16_t SI4735::getRdsPI | ( | void | ) |
Returns the programa type.
Read the Block A content
References SI4735::getRdsNewBlockA(), and SI4735::getRdsReceived().
uint8_t SI4735::getRdsGroupType | ( | void | ) |
Returns the Group Type (extracted from the Block B)
uint8_t SI4735::getRdsFlagAB | ( | void | ) |
Returns the current Text Flag A/B
uint8_t SI4735::getRdsTextSegmentAddress | ( | void | ) |
Returns the address of the text segment.
2A - Each text segment in version 2A groups consists of four characters. A messages of this group can be have up to 64 characters.
2B - In version 2B groups, each text segment consists of only two characters. When the current RDS status is using this version, the maximum message length will be 32 characters.
uint8_t SI4735::getRdsVersionCode | ( | void | ) |
Gets the version code (extracted from the Block B)
uint8_t SI4735::getRdsProgramType | ( | void | ) |
Returns the Program Type (extracted from the Block B)
void SI4735::getNext2Block | ( | char * | c | ) |
Process data received from group 2B.
c | char array reference to the "group 2B" text |
Referenced by SI4735::getRdsText0A(), and SI4735::getRdsText2B().
void SI4735::getNext4Block | ( | char * | c | ) |
Process data received from group 2A.
c | char array reference to the "group 2A" text |
Referenced by SI4735::getRdsText(), and SI4735::getRdsText2A().
char * SI4735::getRdsText | ( | void | ) |
Gets the RDS Text when the message is of the Group Type 2 version A.
References SI4735::getNext4Block(), SI4735::rds_buffer2A, and SI4735::rdsTextAdress2A.
char * SI4735::getRdsText0A | ( | void | ) |
Gets the station name and other messages.
References SI4735::getNext2Block(), SI4735::getRdsReceived(), SI4735::rds_buffer0A, and SI4735::rdsTextAdress0A.
char * SI4735::getRdsText2A | ( | void | ) |
Gets the Text processed for the 2A group.
References SI4735::getNext4Block(), SI4735::getRdsReceived(), SI4735::rds_buffer2A, and SI4735::rdsTextAdress2A.
char * SI4735::getRdsText2B | ( | void | ) |
Gets the Text processed for the 2B group.
References SI4735::getNext2Block(), SI4735::rds_buffer2B, and SI4735::rdsTextAdress2B.
char * SI4735::getRdsTime | ( | void | ) |
Gets the RDS time and date when the Group type is 4.
References SI4735::rds_time.