It bloody plays

Dependencies:   mbed wave_player wavfile

Files at this revision

API Documentation at this revision

Comitter:
rogerhippo
Date:
Wed Mar 20 11:59:20 2019 +0000
Parent:
0:bdadf0052e87
Commit message:
It is bloody working now

Changed in this revision

SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
wavfile.lib Show annotated file Show diff for this revision Revisions of this file
diff -r bdadf0052e87 -r 804c1daa860b SDFileSystem.lib
--- a/SDFileSystem.lib	Mon Apr 30 12:42:55 2018 +0000
+++ b/SDFileSystem.lib	Wed Mar 20 11:59:20 2019 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/neilt6/code/SDFileSystem/#923df4ee70c4
+https://os.mbed.com/users/FelipeVR/code/SDFileSystem/#70ff1cadb69a
diff -r bdadf0052e87 -r 804c1daa860b main.cpp
--- a/main.cpp	Mon Apr 30 12:42:55 2018 +0000
+++ b/main.cpp	Wed Mar 20 11:59:20 2019 +0000
@@ -4,28 +4,29 @@
 
 #define PC_BAUD   9600
 
-SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd", PTE6, SDFileSystem::SWITCH_POS_NO, 25000000);
+SDFileSystem sd(PTD2, PTD3, PTD1, PTE5, "sd");
 Serial pc(USBTX,USBRX);
 
-AnalogOut DACout(DAC0_OUT);
+AnalogOut DACout(PTE30);
 wave_player waver(&DACout);
 
 
 int main() 
 {
-    //Configure CRC, small frames, and write validation
-    sd.crc(true);
-    sd.large_frames(false);     // SPI 16 bits not supported ???  
-    sd.write_validation(true);
+
     
     //waver.set_verbosity(1);
     FILE *wave_file;
     pc.baud(PC_BAUD);
     printf("\n\r\n\rGoing to open a file...\n\r");
-    wave_file=fopen("/sd/sp.wav","r");
+    wave_file=fopen("/sd/coin.wav","r");
     printf("Opened a file. Will now play.\n\r");
     waver.play(wave_file);
     printf("Did it play?\n\r");
     fclose(wave_file); 
+    wave_file=fopen("/sd/finish.wav","r");
+    waver.play(wave_file);
+    printf("Did it play?\n\r");
+    fclose(wave_file);
 }
  
\ No newline at end of file
diff -r bdadf0052e87 -r 804c1daa860b wavfile.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wavfile.lib	Wed Mar 20 11:59:20 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/shintamainjp/code/wavfile/#c853ba46d0b9