Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FATFileSystem
Diff: WDplayer/WDplayer.cpp
- Revision:
- 21:f3b0ce18b44f
- Parent:
- 18:14e5391beccf
- Child:
- 26:716bcd47f3ca
diff -r 01efa2bce75d -r f3b0ce18b44f WDplayer/WDplayer.cpp
--- a/WDplayer/WDplayer.cpp Wed May 08 15:48:44 2019 +0000
+++ b/WDplayer/WDplayer.cpp Thu May 09 06:22:53 2019 +0000
@@ -58,7 +58,7 @@
_fptr = fopen(_path,"r");
fseek(_fptr,44,SEEK_SET);
}
- //Sampling If Statements
+ //end of file reset
if (_tck == _length) {
_fptr = NULL;
_tck = 0;
@@ -82,7 +82,7 @@
vtck = 4000;
_tck = 0;
}
- //CORE ENGINE WRITING
+ //CORE ENGINE - Opertes on a two data Block system one to read from and one to write to.
if (_tck + 2000 >= _length) {
_fptr = NULL;
_tck = 0;
@@ -128,13 +128,14 @@
}
void WDplayer::ISRreset() {
+ ISR.detach();
free(cache);
lock = false;
vtck = 4000;
_tck = 0;
- ISR.detach();
}
+//ISR attached Function
void WDplayer::ISRtck() {
_dac->write( cache[vtck] / 255.00 );
if (vtck == 4000) {