Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystem
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 };
Generated on Wed Jul 13 2022 03:20:06 by
1.7.2