Added RDS filter option

You can now select RDS filter on/off in the menu.

Off: RDS data can be dirty, but is very fast.

On: RDS data is buffered and filtered by the TEF668x.
This commit is contained in:
Sjef Verhoeven PE5PVB
2023-06-18 23:03:37 +02:00
parent f0205d785b
commit abf5dd1256
6 changed files with 93 additions and 27 deletions
+13 -1
View File
@@ -229,7 +229,7 @@ bool devTEF_Radio_Get_Quality_Status_AM (int16_t *level, uint16_t *noise, uint16
}
bool devTEF_Radio_Get_RDS_Data (uint16_t *status, uint16_t *A_block, uint16_t *B_block, uint16_t *C_block, uint16_t *D_block, uint16_t *dec_error) {
bool devTEF_Radio_Get_RDS_Status (uint16_t *status, uint16_t *A_block, uint16_t *B_block, uint16_t *C_block, uint16_t *D_block, uint16_t *dec_error) {
uint8_t buf[12];
uint8_t r = devTEF_Get_Cmd(TEF_FM, Cmd_Get_RDS_Status, buf, sizeof(buf));
*status = Convert8bto16b(buf);
@@ -241,6 +241,18 @@ bool devTEF_Radio_Get_RDS_Data (uint16_t *status, uint16_t *A_block, uint16_t *B
return r;
}
bool devTEF_Radio_Get_RDS_Data (uint16_t *status, uint16_t *A_block, uint16_t *B_block, uint16_t *C_block, uint16_t *D_block, uint16_t *dec_error) {
uint8_t buf[12];
uint8_t r = devTEF_Get_Cmd(TEF_FM, Cmd_Get_RDS_Data, buf, sizeof(buf));
*status = Convert8bto16b(buf);
*A_block = Convert8bto16b(buf + 2);
*B_block = Convert8bto16b(buf + 4);
*C_block = Convert8bto16b(buf + 6);
*D_block = Convert8bto16b(buf + 8);
*dec_error = Convert8bto16b(buf + 10);
return r;
}
bool devTEF_Radio_Get_Stereo_Status(uint16_t *status) {
uint8_t buf[2];
uint16_t r = devTEF_Get_Cmd(TEF_FM, Cmd_Get_Signal_Status, buf, sizeof(buf));