You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for reading and clearing decoded time by SCI_DECODE_TIME #41 (#42)
* Add support for check and reset decoding time by SCI_DECODE_TIME
Implemented handling for SCI_DECODE_TIME register according to VS1053b
Datasheet specification (v1.20). When decoding correct data,
current decoded time is shown in this register in full seconds.
Extended API with two methods. One provides estimation of decoding
time using SCI_DECODE_TIME. The other one allows to clear the value of
mentioned register.
Update documentation and bumped version for release.
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,25 @@ Please note that `player.switchToMp3Mode()` is an optional switch. Some of VS105
63
63
You can modify the board, but there is a more elegant way without soldering. For more details please read a discussion here: [http://www.bajdi.com/lcsoft-vs1053-mp3-module/#comment-33773](http://www.bajdi.com/lcsoft-vs1053-mp3-module/#comment-33773).
64
64
<br />No side effects for boards which do not need this switch, so you can call it just in case.
65
65
66
+
#### Additionall functionality
67
+
68
+
Below briefly described. For detailed information please see [VS1053b Datasheet specification](http://www.vlsi.fi/fileadmin/datasheets/vs1053.pdf).
69
+
70
+
##### Test VS1053 chip via `SCI_STATUS`
71
+
To check if the VS1053 chip is connected and able to exchange data to the microcontroller use the `player.isChipConnected()`.
72
+
73
+
This is a lightweight method to check if VS1053 is correctly wired up (power supply and connection to SPI interface).
74
+
75
+
For additional information please see [this issue](https://github.com/baldram/ESP_VS1053_Library/issues/24).
76
+
77
+
##### Check and reset decoding time by `SCI_DECODE_TIME`
78
+
79
+
`uint16_t seconds = player.getDecodedTime(); `
80
+
81
+
Above example and self-explanatory method name tells everything. It simply provides current decoded time in full seconds (from `SCI_DECODE_TIME` register value).
82
+
83
+
Optionally available is also `player.clearDecodedTime()` which clears decoded time (sets `SCI_DECODE_TIME` register to `0x00`).
84
+
66
85
#### Logging / debugging
67
86
68
87
The library uses ESP Arduino framework built in logger (Arduino core for [ESP32](https://github.com/espressif/arduino-esp32/issues/893#issuecomment-348069135) and [ESP8266](https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst#debug-level)).<br />
0 commit comments