![]() |
PU2CLR BK108X Arduino Library 1.0.2
This is an Arduino Library to control the BK108X device
|
Functions | |
char * | BK108X::getRdsProgramInformation (void) |
Gets the Program Information (RT - Radio Text) | |
char * | BK108X::getRdsStationInformation (void) |
Gets the Station Information. | |
char * | BK108X::getRdsStationName (void) |
Gets the Station Name. | |
void | BK108X::getRdsStatus () |
Gets the RDS registers information. | |
void | BK108X::setRdsMode (uint8_t rds_mode=0) |
Sets the Rds Mode Standard or Verbose. | |
void | BK108X::setRds (bool value) |
Sets the RDS operation. | |
bool | BK108X::getRdsReady () |
Returns true if RDS Ready. | |
uint8_t | BK108X::getRdsFlagAB (void) |
Returns the current Text Flag A/B | |
uint16_t | BK108X::getRdsGroupType () |
Return the group type. | |
uint8_t | BK108X::getRdsVersionCode (void) |
Gets the version code (extracted from the Block B) | |
uint8_t | BK108X::getRdsProgramType (void) |
Returns the Program Type (extracted from the Block B) | |
void | BK108X::getNext2Block (char *c) |
Process data received from group 2B. | |
void | BK108X::getNext4Block (char *c) |
Process data received from group 2A. | |
char * | BK108X::getRdsText (void) |
Gets the RDS Text when the message is of the Group Type 2 version A. | |
char * | BK108X::getRdsText0A (void) |
Gets the station name and other messages. | |
char * | BK108X::getRdsText2A (void) |
Gets the Text processed for the 2A group. | |
char * | BK108X::getRdsText2B (void) |
Gets the Text processed for the 2B group. | |
char * | BK108X::getRdsTime () |
Gets the RDS time and date when the Group type is 4. | |
char * | BK108X::getRdsLocalTime () |
Gets the RDS time converted to local time. | |
bool | BK108X::getRdsSync () |
Get the Rds Sync. | |
void | BK108X::clearRdsBuffer () |
Clear RDS Information (Station Name, Station Information, Program Information and Time) | |
|
inline |
Gets the Program Information (RT - Radio Text)
@
Process the program information data. Same getRdsText2A(). It is a alias for getRdsText2A.
ATTENTION: You must call getRdsReady before calling this function.
Definition at line 1108 of file BK108X.h.
References BK108X::getRdsText2A().
|
inline |
Gets the Station Information.
ATTENTION: You must call getRdsReady before calling this function.
Definition at line 1117 of file BK108X.h.
References BK108X::getRdsText2B().
|
inline |
Gets the Station Name.
Alias for getRdsText0A
ATTENTION: You must call getRdsReady before calling this function.
Definition at line 1127 of file BK108X.h.
References BK108X::getRdsText0A().
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];
Definition at line 1058 of file BK108X.cpp.
void BK108X::setRdsMode | ( | uint8_t | rds_mode = 0 | ) |
Sets the Rds Mode Standard or Verbose.
rds_mode | 0 = Standard (default); 1 = Verbose |
Definition at line 1069 of file BK108X.cpp.
void BK108X::setRds | ( | bool | value | ) |
Sets the RDS operation.
Enable or Disable the RDS
true | = turns the RDS ON; false = turns the RDS OFF |
Definition at line 1081 of file BK108X.cpp.
Referenced by BK108X::setRDS().
bool BK108X::getRdsReady | ( | ) |
Returns true if RDS Ready.
Read addresses 0Ah, 0Ch, 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 must call this function before calling any RDS function to process data
Definition at line 1098 of file BK108X.cpp.
uint8_t BK108X::getRdsFlagAB | ( | void | ) |
Returns the current Text Flag A/B
You must call getRdsReady before calling this function
Definition at line 1117 of file BK108X.cpp.
uint16_t BK108X::getRdsGroupType | ( | ) |
Return the group type.
You must call getRdsReady before calling this function
Definition at line 1128 of file BK108X.cpp.
uint8_t BK108X::getRdsVersionCode | ( | void | ) |
Gets the version code (extracted from the Block B)
You must call getRdsReady before calling this function
Definition at line 1142 of file BK108X.cpp.
uint8_t BK108X::getRdsProgramType | ( | void | ) |
Returns the Program Type (extracted from the Block B)
<>
You must call getRdsReady before calling this function
Definition at line 1156 of file BK108X.cpp.
void BK108X::getNext2Block | ( | char * | c | ) |
Process data received from group 2B.
c | char array reference to the "group 2B" text |
Definition at line 1170 of file BK108X.cpp.
Referenced by BK108X::getRdsText0A(), and BK108X::getRdsText2B().
void BK108X::getNext4Block | ( | char * | c | ) |
Process data received from group 2A.
c | char array reference to the "group 2A" text |
Definition at line 1205 of file BK108X.cpp.
Referenced by BK108X::getRdsText2A().
char * BK108X::getRdsText | ( | void | ) |
Gets the RDS Text when the message is of the Group Type 2 version A.
Definition at line 1240 of file BK108X.cpp.
char * BK108X::getRdsText0A | ( | void | ) |
Gets the station name and other messages.
Definition at line 1253 of file BK108X.cpp.
References BK108X::getNext2Block(), and BK108X::rds_buffer0A.
Referenced by BK108X::getRdsStationName().
char * BK108X::getRdsText2A | ( | void | ) |
Gets the Text processed for the 2A group.
@
Definition at line 1282 of file BK108X.cpp.
References BK108X::getNext4Block(), and BK108X::rds_buffer2A.
Referenced by BK108X::getRdsProgramInformation().
char * BK108X::getRdsText2B | ( | void | ) |
Gets the Text processed for the 2B group.
Definition at line 1309 of file BK108X.cpp.
References BK108X::getNext2Block(), and BK108X::rds_buffer2B.
Referenced by BK108X::getRdsStationInformation().
char * BK108X::getRdsTime | ( | ) |
Gets the RDS time and date when the Group type is 4.
Definition at line 1333 of file BK108X.cpp.
References BK108X::rds_time.
char * BK108X::getRdsLocalTime | ( | ) |
Gets the RDS time converted to local time.
ATTENTION: You must call getRdsReady before calling this function.
ATTENTION: Some stations broadcast wrong time.
Definition at line 1398 of file BK108X.cpp.
References BK108X::rds_time.
bool BK108X::getRdsSync | ( | ) |
Get the Rds Sync.
Returns true if RDS currently synchronized.
Definition at line 1462 of file BK108X.cpp.
void BK108X::clearRdsBuffer | ( | ) |
Clear RDS Information (Station Name, Station Information, Program Information and Time)
Clear the buffer with latest RDS information
Definition at line 1472 of file BK108X.cpp.
References BK108X::rds_buffer0A, BK108X::rds_buffer2A, BK108X::rds_buffer2B, and BK108X::rds_time.