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

Functions

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

Detailed Description

RDS/RBDS

Todo:
Need optimizing the method to get the RDS informastion - getStatusRegisters should be called just once at a cicle.

Function Documentation

◆ setRDS()

void RDA5807::setRDS ( bool  value)

Sets the RDS operation.

Enable or Disable the RDS

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

◆ setRBDS()

void RDA5807::setRBDS ( bool  value)

Sets the RBDS operation.

Enable or Disable the RDS

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

◆ getRdsReady()

bool RDA5807::getRdsReady ( )

Returns true if RDS Ready.

Read address 0Ah and check the bit RDSR.

When using the polling method, it is best not to poll continuously. The data will appear in intervals.

Returns
true
false

◆ getRdsFlagAB()

uint8_t RDA5807::getRdsFlagAB ( void  )

Returns the current Text Flag A/B

Returns
uint8_t current Text Flag A/B

References RDA5807::getStatusRegisters().

◆ getRdsGroupType()

uint16_t RDA5807::getRdsGroupType ( )

Return the group type.

Returns
uint16_t

References RDA5807::getStatusRegisters().

◆ getRdsVersionCode()

uint8_t RDA5807::getRdsVersionCode ( void  )

Gets the version code (extracted from the Block B)

Returns
0=A or 1=B

References RDA5807::getStatusRegisters().

◆ getRdsProgramType()

uint8_t RDA5807::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)

References RDA5807::getStatusRegisters().

◆ getNext2Block()

void RDA5807::getNext2Block ( char *  c)

Process data received from group 2B.

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

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

◆ getNext4Block()

void RDA5807::getNext4Block ( char *  c)

Process data received from group 2A.

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

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

◆ getRdsText()

char * RDA5807::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 RDA5807::getNext4Block(), and RDA5807::getStatusRegisters().

◆ getRdsText0A()

char * RDA5807::getRdsText0A ( void  )

Gets the station name and other messages.

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

References RDA5807::getNext2Block(), and RDA5807::getStatusRegisters().

◆ getRdsText2A()

char * RDA5807::getRdsText2A ( void  )

Gets the Text processed for the 2A group.

@

Returns
char* string with the Text of the group A2

References RDA5807::getNext4Block(), and RDA5807::getStatusRegisters().

◆ getRdsText2B()

char * RDA5807::getRdsText2B ( void  )

Gets the Text processed for the 2B group.

Returns
char* string with the Text of the group AB

References RDA5807::getNext2Block(), and RDA5807::getStatusRegisters().

◆ getRdsTime()

char * RDA5807::getRdsTime ( )

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

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

References RDA5807::getStatusRegisters().

◆ getRdsSync()

bool RDA5807::getRdsSync ( )

Get the Rds Sync.

Returns true if RDS currently synchronized.

Returns
true or false