2
3
4
5
6
7
8
9
10
15
16
17
20
21
22
23
24
25
26
27
28
29
30
31
32
33
39 this->gpio1Control = mcuPin;
40 reg04->refined.GPIO1 = gpioSetup;
43 this->gpio2Control = mcuPin;
44 reg04->refined.GPIO2 = gpioSetup;
47 this->gpio3Control = mcuPin;
48 reg04->refined.GPIO3 = gpioSetup;
51 gpio1Control = gpio2Control = gpio3Control = -1;
53 setRegister(
REG04, reg04->raw);
57
58
59
60
61
62
63
64
67 reg04->refined.GPIO2 = value;
68 reg04->refined.STCIEN = value;
69 setRegister(
REG04, reg04->raw);
73
74
75
76
77
78
84 Wire.requestFrom(
this->deviceAddressFullAccess, 12);
85 for (i = 0; i < 6; i++)
87 aux.refined.highByte = Wire.read();
88 aux.refined.lowByte = Wire.read();
89 shadowStatusRegisters[i] = aux.raw;
91 Wire.endTransmission();
95
96
97
98
99
100
101
102word16_to_bytes
RDA5807::getDirectRegister(uint8_t reg)
106 Wire.beginTransmission(
this->deviceAddressDirectAccess);
108 Wire.endTransmission(
false);
109 Wire.requestFrom(
this->deviceAddressDirectAccess, 2);
110 aux.refined.highByte = Wire.read();
111 aux.refined.lowByte = Wire.read();
112 Wire.endTransmission();
118
119
120
121
122
123
128 if (reg < 0x0A || reg > 0x0F)
131 Wire.beginTransmission(
this->deviceAddressDirectAccess);
133 Wire.endTransmission(
false);
134 Wire.requestFrom(
this->deviceAddressDirectAccess, 2);
135 delayMicroseconds(250);
136 aux.refined.highByte = Wire.read();
137 aux.refined.lowByte = Wire.read();
138 Wire.endTransmission(
true);
139 shadowStatusRegisters[reg - 0x0A] = aux.raw;
141 return &shadowStatusRegisters[reg - 0x0A];
145
146
147
148
149
150
151
152
153
159 Wire.beginTransmission(
this->deviceAddressDirectAccess);
162 Wire.write(aux.refined.highByte);
163 Wire.write(aux.refined.lowByte);
164 Wire.endTransmission();
165 shadowRegisters[reg] = aux.raw;
166 delayMicroseconds(3000);
170
171
172
178 }
while (reg0a->refined.STC == 0);
182
183
184
185
186
189 reg02->refined.SOFT_RESET = 1;
190 setRegister(
REG02, reg02->raw);
194
195
196
200 reg02->refined.NEW_METHOD = 0;
201 reg02->refined.RDS_EN = 0;
202 reg02->refined.CLK_MODE =
this->clockFrequency;
203 reg02->refined.RCLK_DIRECT_IN =
this->oscillatorType;
204 reg02->refined.NON_CALIBRATE =
this->rlckNoCalibrate;
205 reg02->refined.MONO = 1;
206 reg02->refined.DMUTE = 1;
207 reg02->refined.DHIZ = 1;
208 reg02->refined.ENABLE = 1;
209 reg02->refined.BASS = 1;
210 reg02->refined.SEEK = 0;
212 setRegister(
REG02, reg02->raw);
215 reg05->refined.INT_MODE = 0;
216 reg05->refined.LNA_PORT_SEL = 2;
217 reg05->refined.LNA_ICSEL_BIT = 0;
218 reg05->refined.SEEKTH = 8;
219 reg05->refined.VOLUME = 0;
221 setRegister(
REG05, reg05->raw);
225
226
227
228
229
232 reg02->refined.NEW_METHOD = value;
233 setRegister(
REG02, reg02->raw);
237
238
239
242 reg02->refined.SEEK = 0;
243 reg02->refined.ENABLE = 0;
244 setRegister(
REG02, reg02->raw);
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273void RDA5807::
setup(uint8_t clock_frequency, uint8_t oscillator_type, uint8_t rlck_no_calibrate)
275 this->oscillatorType = oscillator_type;
276 this->clockFrequency = clock_frequency;
277 this->rlckNoCalibrate = rlck_no_calibrate;
283 delay(
this->maxDelayAftarCrystalOn);
287
288
289
290
293 reg00->raw = getDirectRegister(0x0).raw;
298
299
300
303
304
305
306
307
310 reg07->refined.SOFTBLEND_EN = value;
311 setRegister(
REG07, reg07->raw);
315
316
317
318
319
322 reg04->refined.AFCD = value;
323 setRegister(
REG04, reg04->raw);
327
328
329
330
331
332
333
334
335
336
337
340 reg03->refined.CHAN = channel;
341 reg03->refined.TUNE = 1;
342 reg03->refined.BAND =
this->currentFMBand;
343 reg03->refined.SPACE =
this->currentFMSpace;
344 reg03->refined.DIRECT_MODE = 0;
345 setRegister(
REG03, reg03->raw);
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
374 uint16_t channel = (frequency -
this->startBand[currentFMBand]) / (
this->fmSpace[
this->currentFMSpace]);
376 this->currentFrequency = frequency;
380
381
382
383
384
387 reg08->directFrequency = frequency;
388 setRegister(
REG08, reg08->directFrequency);
389 this->currentFrequency = frequency;
393
394
395
396
399 reg07->refined.FREQ_MODE = value;
400 setRegister(
REG07, reg07->raw);
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
426 if (
this->currentFrequency <
this->endBand[
this->currentFMBand])
427 this->currentFrequency += (
this->fmSpace[currentFMSpace]);
429 this->currentFrequency =
this->startBand[
this->currentFMBand];
431 setFrequency(
this->currentFrequency);
435
436
437
438
441 if (
this->currentFrequency >
this->startBand[
this->currentFMBand])
442 this->currentFrequency -= (
this->fmSpace[currentFMSpace]);
444 this->currentFrequency =
this->endBand[
this->currentFMBand];
446 setFrequency(
this->currentFrequency);
450
451
452
453
456 return this->currentFrequency;
460
461
462
463
464
465
466
467
471 return reg0a->refined.READCHAN;
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
492 return getRealChannel() * (
this->fmSpace[
this->currentFMSpace]) +
this->startBand[currentFMBand];
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
520 reg02->refined.SEEK = 1;
521 reg02->refined.SKMODE = seek_mode;
522 reg02->refined.SEEKUP = direction;
523 setRegister(
REG02, reg02->raw);
524 setFrequency(getRealFrequency());
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559void RDA5807::
seek(uint8_t seek_mode, uint8_t direction,
void (*showFunc)())
564 reg02->refined.SEEK = 1;
565 reg02->refined.SKMODE = seek_mode;
566 reg02->refined.SEEKUP = direction;
567 setRegister(
REG02, reg02->raw);
568 this->currentFrequency = getRealFrequency();
569 if (showFunc != NULL)
575 }
while (reg0a->refined.STC == 0);
577 setFrequency(getRealFrequency());
581
582
583
584
587 reg05->refined.SEEKTH = value;
588 setRegister(
REG05, reg05->raw);
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
623 reg03->refined.BAND =
this->currentFMBand = band;
624 setRegister(
REG03, reg03->raw);
628
629
630
631
632
633
634
637 if (
this->currentFMBand != 3)
639 reg07->refined.MODE_50_60 = band3Mode;
640 setRegister(
REG07, reg07->raw);
644
645
646
647
648
652 tmp.raw = getDirectRegister(0x07).raw;
653 return tmp.refined.MODE_50_60;
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
693 reg03->refined.SPACE = space;
694 this->currentFMSpace = space;
695 setRegister(
REG03, reg03->raw);
699
700
701
702
703
704
725 this->setSpace(space);
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
748 reg04->refined.DE = de;
749 setRegister(
REG04, reg04->raw);
753
754
755
756
757
758
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
780 this->oldTextABFlag = reg02->refined.SEEK = 0;
781 reg02->refined.RDS_EN = value;
782 setRegister(
REG02, reg02->raw);
786
787
788
789
790
791
794 this->oldTextABFlag = reg02->refined.SEEK = 0;
795 reg02->refined.RDS_EN = 1;
796 setRegister(
REG02, reg02->raw);
797 reg04->refined.RBDS = value;
798 setRegister(
REG04, reg04->raw);
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
827 return reg0a->refined.RDSR;
831
832
833
834
835
836
840 blkb.blockB = reg0d->RDSB;
841 return blkb.refined.textABFlag;
845
846
847
848
849
850
851
852
853
857 blkb.blockB = reg0d->RDSB;
858 if (blkb.refined.textABFlag !=
this->oldTextABFlag)
860 this->oldTextABFlag = blkb.refined.textABFlag;
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893bool RDA5807::
getRdsAllData(
char **stationName,
char **stationInformation,
char **programInformation,
char **utcTime) {
902 return (
bool)stationName | (
bool)stationInformation | (
bool) programInformation | (
bool) utcTime;
907
908
909
910
911
912
916 blkb.blockB = reg0d->RDSB;
917 return blkb.group0.groupType;
921
922
923
924
925
926
930 blkb.blockB = reg0d->RDSB;
931 return blkb.refined.versionCode;
935
936
937
938
939
940
941
942
946 blkb.blockB = reg0d->RDSB;
947 return blkb.refined.programType;
951
952
953
954
955
962 blk.raw = reg0f->RDSD;
964 raw[1] = blk.refined.lowByte;
965 raw[0] = blk.refined.highByte;
967 for (i = j = 0; i < 2; i++)
969 if (raw[i] == 0xD || raw[i] == 0xA)
987
988
989
990
991
992
997 word16_to_bytes blk_c, blk_d;
999 blk_c.raw = reg0e->RDSC;
1000 blk_d.raw = reg0f->RDSD;
1002 raw[0] = blk_c.refined.highByte;
1003 raw[1] = blk_c.refined.lowByte;
1004 raw[2] = blk_d.refined.highByte;
1005 raw[3] = blk_d.refined.lowByte;
1007 for (i = j = 0; i < 4; i++)
1009 if (raw[i] == 0xD || raw[i] == 0xA)
1028
1029
1030
1031
1032
1033
1034
1037 static int rdsTextAdress0A;
1040 blkb.blockB = reg0d->RDSB;
1042 if (blkb.group0.groupType == 0)
1045 rdsTextAdress0A = blkb.group0.address;
1046 if (rdsTextAdress0A >= 0 && rdsTextAdress0A < 4)
1057
1058
1059
1060
1061
1062
1063
1064
1067 static int rdsTextAdress2A;
1070 blkb.blockB = reg0d->RDSB;
1071 rdsTextAdress2A = blkb.group2.address;
1073 if (blkb.group2.groupType == 2)
1077 if (rdsTextAdress2A >= 0 && rdsTextAdress2A < 16)
1088
1089
1090
1091
1092
1093
1094
1097 static int rdsTextAdress2B;
1100 blkb.blockB = reg0d->RDSB;
1101 if (blkb.group2.groupType == 1)
1104 rdsTextAdress2B = blkb.group2.address;
1105 if (rdsTextAdress2B >= 0 && rdsTextAdress2B < 16)
1115
1116
1117
1118
1119
1120
1121
1125 word16_to_bytes blk_b, blk_c, blk_d;
1128 blk_b.raw = blkb.blockB = reg0d->RDSB;
1129 blk_c.raw = reg0e->RDSC;
1130 blk_d.raw = reg0f->RDSD;
1135 if (blkb.group0.groupType == 4)
1143 dt.raw[4] = blk_b.refined.lowByte;
1144 dt.raw[5] = blk_b.refined.highByte;
1146 dt.raw[2] = blk_c.refined.lowByte;
1147 dt.raw[3] = blk_c.refined.highByte;
1149 dt.raw[0] = blk_d.refined.lowByte;
1150 dt.raw[1] = blk_d.refined.highByte;
1152 minute = dt.refined.minute;
1153 hour = dt.refined.hour;
1155 offset_sign = (dt.refined.offset_sense == 1) ?
'+' :
'-';
1156 offset_h = (dt.refined.offset * 30) / 60;
1157 offset_m = (dt.refined.offset * 30) - (offset_h * 60);
1160 this->convertToChar(hour, rds_time, 2, 0,
' ',
false);
1162 this->convertToChar(minute, &rds_time[3], 2, 0,
' ',
false);
1165 this->convertToChar(offset_h, &
rds_time[7], 2, 0,
' ',
false);
1167 this->convertToChar(offset_m, &
rds_time[10], 2, 0,
' ',
false);
1177
1178
1179
1180
1181
1182
1183
1184
1188 word16_to_bytes blk_b, blk_c, blk_d;
1191 blk_b.raw = blkb.blockB = reg0d->RDSB;
1192 blk_c.raw = reg0e->RDSC;
1193 blk_d.raw = reg0f->RDSD;
1199 if (blkb.group0.groupType == 4)
1204 dt.raw[4] = blk_b.refined.lowByte;
1205 dt.raw[5] = blk_b.refined.highByte;
1207 dt.raw[2] = blk_c.refined.lowByte;
1208 dt.raw[3] = blk_c.refined.highByte;
1210 dt.raw[0] = blk_d.refined.lowByte;
1211 dt.raw[1] = blk_d.refined.highByte;
1213 minute = dt.refined.minute;
1214 hour = dt.refined.hour;
1216 offset_h = (dt.refined.offset * 30) / 60;
1217 offset_m = (dt.refined.offset * 30) - (offset_h * 60);
1219 localTime = (hour * 60 + minute);
1220 if ( dt.refined.offset_sense == 1)
1221 localTime -= (offset_h * 60 + offset_m);
1223 localTime += (offset_h * 60 + offset_m);
1225 hour = localTime / 60;
1226 minute = localTime - (hour * 60);
1228 this->convertToChar(hour, rds_time, 2, 0,
' ',
false);
1230 this->convertToChar(minute, &rds_time[3], 2, 0,
' ',
false);
1243
1244
1245
1246
1247
1248
1251 reg04->refined.RDS_FIFO_EN = value;
1252 setRegister(
REG04, reg04->raw);
1256
1257
1258
1259
1260
1261
1264 reg04->refined.RDS_FIFO_CLR = value;
1265 setRegister(
REG04, reg04->raw);
1270
1271
1272
1273
1285
1286
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301void RDA5807::
convertToChar(uint16_t value,
char *strValue, uint8_t len, uint8_t dot, uint8_t separator,
bool remove_leading_zeros)
1304 for (
int i = (len - 1); i >= 0; i--)
1308 strValue[i] = d + 48;
1310 strValue[len] =
'\0';
1313 for (
int i = len; i >= dot; i--)
1315 strValue[i + 1] = strValue[i];
1317 strValue[dot] = separator;
1320 if (remove_leading_zeros)
1322 if (strValue[0] ==
'0')
1325 if (strValue[1] ==
'0')
1332
1333
1334
1335
1336
1337
1343 for (address = 1; address < 127; address++)
1345 Wire.beginTransmission(address);
1346 error = Wire.endTransmission();
1349 addressArray[idx] = address;
1352 else if (error == 4)
1359
1360
1361
1362
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386void RDA5807::
setI2SAllParameters(uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)
1388 reg06->refined.R_DELY = R_DELY;
1389 reg06->refined.L_DELY = L_DELY;
1390 reg06->refined.SCLK_O_EDGE = SCLK_O_EDGE;
1391 reg06->refined.SW_O_EDGE = SW_O_EDGE;
1392 reg06->refined.I2S_SW_CNT = I2S_SW_CNT;
1393 reg06->refined.WS_I_EDGE = WS_I_EDGE;
1394 reg06->refined.DATA_SIGNED = DATA_SIGNED;
1395 reg06->refined.SCLK_I_EDGE = SCLK_I_EDGE;
1396 reg06->refined.WS_LR = WS_LR;
1397 reg06->refined.SLAVE_MASTER = SLAVE_MASTER;
1398 reg06->refined.OPEN_MODE = OPEN_MODE;
1400 setRegister(
REG06, reg06->raw);
1404
1405
1406
1407
1408
1409
1412 reg04->refined.I2S_ENABLE = value;
1413 setRegister(
REG04, reg04->raw);
1417
1418
1419
1420
1421
1424 reg06->refined.SLAVE_MASTER = !value;
1425 setRegister(
REG06, reg06->raw);
1429
1430
1431
1432
1433
1434
1437 reg06->refined.I2S_SW_CNT = value;
1438 setRegister(
REG06, reg06->raw);
1442
1443
1444
1445
1446
1449 reg06->refined.DATA_SIGNED = value;
1450 setRegister(
REG06, reg06->raw);
1454
1455
1456
1459
1460
1461
1462
1465 reg04->refined.SOFTMUTE_EN = value;
1466 setRegister(
REG04, reg04->raw);
1470
1471
1472
1473
1476 reg02->refined.SEEK = 0;
1477 reg02->refined.DMUTE = !value;
1478 setRegister(
REG02, reg02->raw);
1482
1483
1484
1485
1486
1489 reg02->refined.SEEK = 0;
1490 reg02->refined.DHIZ = !value;
1491 setRegister(
REG02, reg02->raw);
1495
1496
1497
1498
1499
1502 reg02->refined.SEEK = 0;
1503 reg02->refined.MONO = value;
1504 setRegister(
REG02, reg02->raw);
1508
1509
1510
1511
1512
1515 reg02->refined.SEEK = 0;
1516 reg02->refined.BASS = value;
1517 setRegister(
REG02, reg02->raw);
1521
1522
1523
1524
1525
1529 return reg0a->refined.ST;
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1561 reg05->refined.VOLUME =
this->currentVolume = value;
1562 setRegister(
REG05, reg05->raw);
1566
1567
1568
1569
1570
1573 return this->currentVolume;
1577
1578
1579
1580
1583 if (
this->currentVolume < 15)
1585 this->currentVolume++;
1586 setVolume(
this->currentVolume);
1591
1592
1593
1594
1597 if (
this->currentVolume > 0)
1599 this->currentVolume--;
1600 setVolume(
this->currentVolume);
1605
1606
1607
1610
1611
1612
1613
1614
1617 reg05->refined.LNA_ICSEL_BIT = value;
1618 setRegister(
REG05, reg05->raw);
1622
1623
1624
1625
1626
1629 reg05->refined.LNA_PORT_SEL = value;
1630 setRegister(
REG05, reg05->raw);
1634
1635
1636
1637
1638
1639
1643 return reg0b->refined.RSSI;
#define REG02
Register 0x02.
#define REG07
Register 0x07.
#define REG0A
Register 0x0A.
#define REG0B
Register 0x0B.
#define REG05
Register 0x05.
#define REG04
Register 0x04.
#define REG08
Register 0x08.
#define REG03
Register 0x03.
#define REG06
Register 0x06.
void convertToChar(uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)
Converts a number to a char array.
int checkI2C(uint8_t *addressArray)
Check the I2C bus address.
char rds_buffer0A[9]
PS - RDS Basic tuning and switching information (Type 0 groups) - Station Name.
char rds_time[25]
CT - RDS date time received information - UTC Time.
char rds_buffer2B[33]
RDS Radio Text buffer - Station Information.
char rds_buffer2A[65]
RT - RDS Radio Text buffer - Program Information.
void * getStatus(uint8_t reg)
Gets the register content of a given status register (from 0x0A to 0x0F)
void powerDown()
Power the receiver off.
void setup(uint8_t clock_frequency=CLOCK_32K, uint8_t oscillator_type=OSCILLATOR_TYPE_PASSIVE, uint8_t rlck_no_calibrate=RLCK_NO_CALIBRATE_MODE_OFF)
Starts the device.
void powerUp()
Powers the receiver on.
void setRegister(uint8_t reg, uint16_t value)
Sets a given value to a specific device register.
void softReset()
Resets the device.
void waitAndFinishTune()
Waits for Seek or Tune finish.
void setGpio(uint8_t gpioPin, uint8_t gpioSetup=0, int mcuPin=-1)
Sets the Device GPIO pins.
void setNewDemodulateMethod(bool value)
Sets new demodulate method. It can improve the receiver sensitivity about 1dB.
void getStatusRegisters()
Gets all current device status and RDS information registers (From 0x0A to 0x0F)
void setInterruptMode(uint8_t value)
Sets Interrupt Mode.
uint16_t getDeviceId()
Gets the Device identification.
void setBand3_50_65_Mode(uint8_t band3Mode)
Sets the band 3 mode: 50 to 65 MHZ or 65 to 76 MHz.
uint16_t getRealFrequency()
Gets the current frequency bases on the current channel.
uint16_t getRealChannel()
Gets the current channel stored in 0x0A status register.
void setSeekThreshold(uint8_t value)
Sets RSSI Seek Threshold.
void setDirectFrequency(uint16_t frequency)
Sets the frequency using the reg08 (direct frequency)
void setFrequencyUp()
Increments the current frequency.
void setFmDeemphasis(uint8_t de)
Sets De-emphasis.
uint16_t getFrequency()
Gets the current frequency.
void setSoftBlendEnable(bool value)
Sets Soft Blend.
void setSpace(uint8_t space=0)
Sets the FM channel space.
void seek(uint8_t seek_mode, uint8_t direction)
Seek function.
void setBand(uint8_t band=0)
Sets the FM band. See table below.
void setStep(uint8_t step=100)
Sets the FM Step;.
void setAFC(bool value)
Sets AFC true or false.
void setChannel(uint16_t channel)
Sets the channel.
void setFrequency(uint16_t frequency)
Sets the frequency.
void setFrequencyDown()
Decrements the current frequency.
void seek(uint8_t seek_mode, uint8_t direction, void(*showFunc)())
Seek function.
void setFrequencyMode(uint8_t value)
Sets the frequency mode. If 1, then freq setting changed.
uint8_t getBand3Status()
Gets the status of the Band3.
uint8_t getRdsFlagAB(void)
Returns the current Text Flag A/B.
void clearRdsFifo(bool value=1)
Clear RDS fifo.
void clearRdsBuffer()
Clear RDS Information (Station Name, Station Information, Program Information and Time)
uint16_t getRdsGroupType()
Return the group type.
void getNext4Block(char *c)
Process data received from group 2A.
char * getRdsText2A(void)
Gets the Program Information.
void setRDS(bool value)
Sets the RDS operation.
char * getRdsText0A(void)
Gets the station name and other messages.
void getNext2Block(char *c)
Process data received from group 2B.
char * getRdsLocalTime()
Gets the RDS time converted to local time.
bool hasRdsInfoAB()
Returns true when the RDS system has valid information.
char * getRdsText2B(void)
Gets the Station Information.
bool getRdsReady()
Returns true if RDS Ready.
bool isNewRdsFlagAB(void)
Returns true if the Text Flag A/B has changed.
uint8_t getRdsVersionCode(void)
Gets the version code (extracted from the Block B)
bool getRdsAllData(char **stationName, char **stationInformation, char **programInformation, char **utcTime)
Gets Station Name, Station Information, Program Information and utcTime.
void setRdsFifo(bool value)
Sets RDS fifo mode enable.
uint8_t getRdsProgramType(void)
Returns the Program Type (extracted from the Block B)
void setRBDS(bool value)
Sets the RBDS operation.
char * getRdsTime()
Gets the RDS UTC time and date when the Group type is 4.
void setI2SAllParameters(uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)
Configures all parameters for I2S.
void setI2SSpeed(uint8_t value)
Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1,...
void setI2SMaster(bool value)
void setI2SDataSigned(bool value)
If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
void setI2SOn(bool value)
Enables I2S setup.
bool isStereo()
Gets the current Stereo status.
void setVolume(uint8_t value)
Sets the audio volume level.
uint8_t getVolume()
Gets the current audio volume level.
void setBass(bool value)
Sets Bass Boost.
void setVolumeUp()
Increments the audio volume.
void setVolumeDown()
Decrements the audio volume.
void setAudioOutputHighImpedance(bool value)
Sets audio output impedance high ow low.
void setMono(bool value)
Sets audio Mono or stereo.
void setSoftmute(bool value)
Sets Soft Mute Enable or disable.
void setMute(bool value)
Sets Audio mute or unmute.
void setLnaIcSel(uint8_t value)
Sets LNA_ICSEL_BIT.
int getRssi()
Gets the current Rssi.
void setLnaPortSel(uint8_t value)
Sets LNA input port selection bit.