Wave player using MODDMA example Hello World program.

Dependencies:   SDFileSystem mbed wave_player_dma

Fork of WavePlayer_HelloWorld by jim hamblen

Committer:
ebradley6
Date:
Wed Mar 16 19:59:44 2016 +0000
Revision:
3:ebbd7fcecb8d
Parent:
1:5b8e223e983d
Updated comments.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
4180_1 1:5b8e223e983d 1
4180_1 1:5b8e223e983d 2 #include "mbed.h"
4180_1 1:5b8e223e983d 3 #include "SDFileSystem.h"
4180_1 1:5b8e223e983d 4 #include "wave_player.h"
4180_1 1:5b8e223e983d 5
4180_1 1:5b8e223e983d 6
4180_1 1:5b8e223e983d 7 SDFileSystem sd(p5, p6, p7, p8, "sd"); //SD card
4180_1 1:5b8e223e983d 8
4180_1 1:5b8e223e983d 9 AnalogOut DACout(p18);
4180_1 1:5b8e223e983d 10
4180_1 1:5b8e223e983d 11 wave_player waver(&DACout);
4180_1 1:5b8e223e983d 12
4180_1 1:5b8e223e983d 13 int main()
4180_1 1:5b8e223e983d 14 {
4180_1 1:5b8e223e983d 15 FILE *wave_file;
4180_1 1:5b8e223e983d 16 printf("\n\n\nHello, wave world!\n");
4180_1 1:5b8e223e983d 17 wave_file=fopen("/sd/sample.wav","r");
4180_1 1:5b8e223e983d 18 waver.play(wave_file);
4180_1 1:5b8e223e983d 19 fclose(wave_file);
4180_1 1:5b8e223e983d 20 }