PU2CLR SI470X Arduino Library  1.0.1
Arduino Library for Si470X Devices - By Ricardo Lima Caratti
RDS Functions

Functions

void SI470X::getRdsStatus ()
 Gets the RDS registers information. More...
 
void SI470X::setRdsMode (uint8_t rds_mode=0)
 Sets the Rds Mode Standard or Verbose. More...
 
void SI470X::setRds (bool value)
 Sets the RDS operation. More...
 
bool SI470X::getRdsReady ()
 Returns true if RDS Ready. More...
 
uint8_t SI470X::getRdsFlagAB (void)
 Returns the current Text Flag A/B
More...
 
uint16_t SI470X::getRdsGroupType ()
 Return the group type. More...
 
uint8_t SI470X::getRdsVersionCode (void)
 Gets the version code (extracted from the Block B) More...
 
uint8_t SI470X::getRdsProgramType (void)
 Returns the Program Type (extracted from the Block B) More...
 
void SI470X::getNext2Block (char *c)
 Process data received from group 2B. More...
 
void SI470X::getNext4Block (char *c)
 Process data received from group 2A. More...
 
char * SI470X::getRdsText (void)
 Gets the RDS Text when the message is of the Group Type 2 version A. More...
 
char * SI470X::getRdsText0A (void)
 Gets the station name and other messages. More...
 
char * SI470X::getRdsText2A (void)
 Gets the Text processed for the 2A group. More...
 
char * SI470X::getRdsText2B (void)
 Gets the Text processed for the 2B group. More...
 
char * SI470X::getRdsTime ()
 Gets the RDS time and date when the Group type is 4. More...
 
bool SI470X::getRdsSync ()
 Get the Rds Sync. More...
 

Detailed Description

RDS/RBDS

Function Documentation

◆ getRdsStatus()

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];

Returns
si470x_reg0a

Referenced by SI470X::getRdsGroupType(), SI470X::getRdsText(), SI470X::getRdsText0A(), SI470X::getRdsText2A(), SI470X::getRdsText2B(), and SI470X::getRdsTime().

◆ setRdsMode()

void SI470X::setRdsMode ( uint8_t  rds_mode = 0)

Sets the Rds Mode Standard or Verbose.

Parameters
rds_mode0 = Standard (default); 1 = Verbose

◆ setRds()

void SI470X::setRds ( bool  value)

Sets the RDS operation.

Enable or Disable the RDS

Parameters
true= turns the RDS ON; false = turns the RDS OFF

◆ getRdsReady()

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.

Returns
true
false

References SI470X::getStatus().

◆ getRdsFlagAB()

uint8_t SI470X::getRdsFlagAB ( void  )

Returns the current Text Flag A/B

Returns
uint8_t current Text Flag A/B

◆ getRdsGroupType()

uint16_t SI470X::getRdsGroupType ( )

Return the group type.

Returns
uint16_t

References SI470X::getRdsStatus().

◆ getRdsVersionCode()

uint8_t SI470X::getRdsVersionCode ( void  )

Gets the version code (extracted from the Block B)

Returns
0=A or 1=B

◆ getRdsProgramType()

uint8_t SI470X::getRdsProgramType ( void  )

Returns the Program Type (extracted from the Block B)


See also
https://en.wikipedia.org/wiki/Radio_Data_System
Returns
program type (an integer betwenn 0 and 31)

◆ getNext2Block()

void SI470X::getNext2Block ( char *  c)

Process data received from group 2B.

Parameters
cchar array reference to the "group 2B" text

Referenced by SI470X::getRdsText0A(), and SI470X::getRdsText2B().

◆ getNext4Block()

void SI470X::getNext4Block ( char *  c)

Process data received from group 2A.

Parameters
cchar array reference to the "group 2A" text

Referenced by SI470X::getRdsText(), and SI470X::getRdsText2A().

◆ getRdsText()

char * SI470X::getRdsText ( void  )

Gets the RDS Text when the message is of the Group Type 2 version A.

Returns
char* The string (char array) with the content (Text) received from group 2A

References SI470X::getNext4Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2A.

◆ getRdsText0A()

char * SI470X::getRdsText0A ( void  )

Gets the station name and other messages.

Todo:
RDS Dynamic PS or Scrolling PS
Returns
char* should return a string with the station name. However, some stations send other kind of messages

References SI470X::getNext2Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer0A.

◆ getRdsText2A()

char * SI470X::getRdsText2A ( void  )

Gets the Text processed for the 2A group.

@

Returns
char* string with the Text of the group A2

References SI470X::getNext4Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2A.

◆ getRdsText2B()

char * SI470X::getRdsText2B ( void  )

Gets the Text processed for the 2B group.

Returns
char* string with the Text of the group AB

References SI470X::getNext2Block(), SI470X::getRdsStatus(), and SI470X::rds_buffer2B.

◆ getRdsTime()

char * SI470X::getRdsTime ( )

Gets the RDS time and date when the Group type is 4.

Returns
char* a string with hh:mm +/- offset

References SI470X::getRdsStatus(), and SI470X::rds_time.

◆ getRdsSync()

bool SI470X::getRdsSync ( )

Get the Rds Sync.

Returns true if RDS currently synchronized.

Returns
true or false

References SI470X::getStatus().