waverplayer RTOS demo - at present time older libraries were needed to avoid SD open errors - so don't update them
Dependencies: SDFileSystem_OldbutworkswithRTOS mbed-rtos mbed wave_player
Fork of WavePlayer_HelloWorld by
This is a demo of the waveplayer using the RTOS on an SD card. I had to use older libraries to get it to work as of 4/18/17 on the LPC1768. Updating libraries adds a lot of compiler warnings about filesystem stuff, and it seems to cause SD card open errors.
Revision 2:c2afd0c426af, committed 2017-04-18
- Comitter:
- 4180_1
- Date:
- Tue Apr 18 13:00:09 2017 +0000
- Parent:
- 1:5b8e223e983d
- Commit message:
- Old libraries for SD,filesystem,mbed,RTOS were needed to get the waveplayer to work with the RTOS. Don't update at present time code always gets an SD card open error - but this version works
Changed in this revision
diff -r 5b8e223e983d -r c2afd0c426af SDFileSystem.lib --- a/SDFileSystem.lib Thu Jan 24 02:59:05 2013 +0000 +++ b/SDFileSystem.lib Tue Apr 18 13:00:09 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/SDFileSystem/#c8f66dc765d4 +https://developer.mbed.org/users/4180_1/code/SDFileSystem_OldbutworkswithRTOS/#e6c086545857
diff -r 5b8e223e983d -r c2afd0c426af main.cpp --- a/main.cpp Thu Jan 24 02:59:05 2013 +0000 +++ b/main.cpp Tue Apr 18 13:00:09 2017 +0000 @@ -1,5 +1,6 @@ #include "mbed.h" +#include "rtos.h" #include "SDFileSystem.h" #include "wave_player.h" @@ -13,8 +14,10 @@ int main() { FILE *wave_file; - printf("\n\n\nHello, wave world!\n"); + printf("\r\n\nHello, wave world!\n\r"); + Thread::wait(1000); wave_file=fopen("/sd/sample.wav","r"); + if(wave_file==NULL) printf("file open error!\n\n\r"); waver.play(wave_file); fclose(wave_file); } \ No newline at end of file
diff -r 5b8e223e983d -r c2afd0c426af mbed-rtos.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Tue Apr 18 13:00:09 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/mbed_official/code/mbed-rtos/#02f5cf381388
diff -r 5b8e223e983d -r c2afd0c426af mbed.bld --- a/mbed.bld Thu Jan 24 02:59:05 2013 +0000 +++ b/mbed.bld Tue Apr 18 13:00:09 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/63cdd78b2dc1 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file