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.
Fork of SMARTWAV by
Revision 1:bfb321f3d233, committed 2015-05-19
- Comitter:
- mkarlsso
- Date:
- Tue May 19 15:43:42 2015 +0000
- Parent:
- 0:d3cb5755b201
- Commit message:
- Initial commit of reorganized stateScript
Changed in this revision
SMARTWAV.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SMARTWAV.cpp Sat Feb 11 22:37:27 2012 +0000 +++ b/SMARTWAV.cpp Tue May 19 15:43:42 2015 +0000 @@ -77,20 +77,32 @@ unsigned char SMARTWAV::playTrackName(char name[]){ //play an Audio file contained on the micro SD card with the given name. unsigned char counter=0; + //if (_serialSMARTWAV.writeable()) { _serialSMARTWAV.putc('F'); + //} while(1){ - _serialSMARTWAV.putc(name[counter]); + //if (_serialSMARTWAV.writeable()) { + _serialSMARTWAV.putc(name[counter]); + //} else { + // break; + //} if(name[counter]==0x00){ break; } counter++; } + return _serialSMARTWAV.getc(); + //return 1; } unsigned char SMARTWAV::stopTrack(){ //Stop playing any active song + + //if (_serialSMARTWAV.writeable()) { _serialSMARTWAV.putc('S'); + //} return _serialSMARTWAV.getc(); + //return 1; } unsigned char SMARTWAV::continuousPlay(unsigned char enable){ //Enable/Disable continuous play, also disabled by calling stopTrack() @@ -106,7 +118,8 @@ unsigned char SMARTWAV::volume(unsigned char vol){ //Set Volume 0-255 _serialSMARTWAV.putc('V'); _serialSMARTWAV.putc(vol); - return _serialSMARTWAV.getc(); + //return _serialSMARTWAV.getc(); + return 1; } unsigned char SMARTWAV::setFolder(char name[]){ //Set/Enters inside a folder/path on the micro SD card with the given name.