This sample will play a ".wav" file of the USB root folder. Only RIFF format, 48kHz, 16bit, 2ch.
Dependencies: USBHostDac USBHost_custom_Addiso
Fork of USBHostDac_example by
Isochronous transfer sample for GR-PEACH. This sample will play a ".wav" file of the USB root folder. Only RIFF format, 48kHz, 16bit, 2ch.
The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication
- Reference information
Revision 4:c7cba8933302, committed 2017-04-21
- Comitter:
- Osamu Nakamura
- Date:
- Fri Apr 21 21:22:51 2017 +0900
- Parent:
- 3:ed025cdb164d
- Commit message:
- Introduced mbed OS 5 instead of mbed OS 2 (Classic)
Changed in this revision
diff -r ed025cdb164d -r c7cba8933302 USBHost_AddIso.lib --- a/USBHost_AddIso.lib Fri Jun 26 08:05:15 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/teams/GR-PEACH_producer_meeting/code/USBHost_AddIso/#2851a9b2bbfb
diff -r ed025cdb164d -r c7cba8933302 USBHost_custom_Addiso.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBHost_custom_Addiso.lib Fri Apr 21 21:22:51 2017 +0900 @@ -0,0 +1,1 @@ +https://mbed.org/teams/Renesas/code/USBHost_custom_Addiso/#5c3ebf7372ee
diff -r ed025cdb164d -r c7cba8933302 main.cpp --- a/main.cpp Fri Jun 26 08:05:15 2015 +0000 +++ b/main.cpp Fri Apr 21 21:22:51 2017 +0900 @@ -1,5 +1,6 @@ #include "mbed.h" #include "USBHostDac.h" +#include "FATFileSystem.h" #include "USBHostMSD.h" #include "dec_wav.h" @@ -39,7 +40,8 @@ usb1en = 0; //Outputs low level #endif - USBHostMSD msd("usb"); + FATFileSystem fs("usb"); + USBHostMSD msd; USBHostDac usbdac; while(1) { @@ -47,6 +49,7 @@ while(!msd.connect()) { Thread::wait(500); } + fs.mount(&msd); // in a loop, append a file // if the device is disconnected, we try to connect it again
diff -r ed025cdb164d -r c7cba8933302 mbed-os.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Fri Apr 21 21:22:51 2017 +0900 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#cf87e7d182a2fc32d1acb680408b030f8ce3ab25
diff -r ed025cdb164d -r c7cba8933302 mbed.bld --- a/mbed.bld Fri Jun 26 08:05:15 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file