Priunsh Nagru / Mbed 2 deprecated VS1053_Demo

Dependencies:   mbed SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MusicPlayer.h Source File

MusicPlayer.h

00001 /*
00002  * Mbed class that creates a music player using the VS1053 + SD breakout
00003  * Created by Priunsh Nagru and Rahul Maran
00004  */
00005  
00006  
00007 #include "mbed.h"
00008 #include "SDFileSystem.h" 
00009  
00010 class MusicPlayer { 
00011 
00012     public:
00013         MusicPlayer(PinName clk, PinName miso, PinName mosi, PinName cs, PinName rst, PinName xdcs, PinName sdcs, PinName dreq);
00014         void playMusic(string fileName);
00015         void stopMusic(); 
00016         void reset();
00017     private: 
00018         bool playing;
00019         DigitalOut _rst;
00020         DigitalOut _cs;
00021         DigitalOut _xdcs;
00022         DigitalOut _sdcs;
00023         DigitalOut _dreq;
00024         SPI _spi;
00025 };