PU2CLR BK108X Arduino Library  1.0.1
This is an Arduino Library to control the BK108X device
RDS Functions

Functions

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

Detailed Description

RDS/RBDS

Function Documentation

◆ getRdsStatus()

void BK108X::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
bk_reg0a

Definition at line 872 of file BK108X.cpp.

◆ setRdsMode()

void BK108X::setRdsMode ( uint8_t  rds_mode = 0)

Sets the Rds Mode Standard or Verbose.

Parameters
rds_mode0 = Standard (default); 1 = Verbose

Definition at line 883 of file BK108X.cpp.

◆ setRds()

void BK108X::setRds ( bool  value)

Sets the RDS operation.

Enable or Disable the RDS

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

Definition at line 895 of file BK108X.cpp.

Referenced by BK108X::setRDS().

◆ getRdsReady()

bool BK108X::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

Definition at line 909 of file BK108X.cpp.

◆ getRdsFlagAB()

uint8_t BK108X::getRdsFlagAB ( void  )

Returns the current Text Flag A/B

Returns
uint8_t current Text Flag A/B

Definition at line 921 of file BK108X.cpp.

◆ getRdsGroupType()

uint16_t BK108X::getRdsGroupType ( )

Return the group type.

Returns
uint16_t

Definition at line 932 of file BK108X.cpp.

◆ getRdsVersionCode()

uint8_t BK108X::getRdsVersionCode ( void  )

Gets the version code (extracted from the Block B)

Returns
0=A or 1=B

Definition at line 943 of file BK108X.cpp.

◆ getRdsProgramType()

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

Definition at line 954 of file BK108X.cpp.

◆ getNext2Block()

void BK108X::getNext2Block ( char *  c)

Process data received from group 2B.

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

Definition at line 965 of file BK108X.cpp.

◆ getNext4Block()

void BK108X::getNext4Block ( char *  c)

Process data received from group 2A.

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

Definition at line 977 of file BK108X.cpp.

◆ getRdsText()

char * BK108X::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

Definition at line 988 of file BK108X.cpp.

◆ getRdsText0A()

char * BK108X::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

Definition at line 1001 of file BK108X.cpp.

◆ getRdsText2A()

char * BK108X::getRdsText2A ( void  )

Gets the Text processed for the 2A group.

@

Returns
char* string with the Text of the group A2

Definition at line 1013 of file BK108X.cpp.

◆ getRdsText2B()

char * BK108X::getRdsText2B ( void  )

Gets the Text processed for the 2B group.

Returns
char* string with the Text of the group AB

Definition at line 1023 of file BK108X.cpp.

◆ getRdsTime()

char * BK108X::getRdsTime ( )

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

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

Definition at line 1033 of file BK108X.cpp.

◆ getRdsSync()

bool BK108X::getRdsSync ( )

Get the Rds Sync.

Returns true if RDS currently synchronized.

Returns
true or false

Definition at line 1044 of file BK108X.cpp.