A simple library for decoding MP3 files with the VS1053 CoDec chip. The initial library was written by Kaoru Onoe. The library is patched to work with some "LC Technology" VS1053 board that have some IC pins disconnected. Because of that problem, there was no sound out of that boards. Now, these board work ok !

Dependents:   W7500_and_VS1053_MP3_decoder VS1053_MP3_decoder_WIZwiki-W7500 VS1053Player Scat

Fork of VS1053 by Kaoru Onoe

Revision:
7:97a8edd44fe9
Parent:
6:1f57fbd3aeb5
Child:
8:5ad25d480d5f
--- a/VS1053.h	Fri Dec 20 21:34:03 2013 +0000
+++ b/VS1053.h	Sat Sep 05 12:16:06 2015 +0000
@@ -1,9 +1,16 @@
-// ==================================================== Dec 21 2013, kayeks ==
-// VS1053.h
-// ===========================================================================
-// Just a simple library for VLSI's mp3/midi codec chip
-//   - Minimal and simple implementation (and dirty too)
-
+/**
+ *  ==================================================== Dec 21 2013, kayeks ==
+ *  VS1053.cpp
+ *  ===========================================================================
+ *  Just a simple library for VLSI's mp3/midi codec chip
+ *       - Minimal and simple implementation (and dirty too)
+ *
+ *  Modified on 05 September 2015 by Vassilis Serasidis.
+ *       -   Added a patch for playing MP3 files on some "LC Technology" VS1053 boards.
+ *
+ *
+ */
+ 
 #ifndef KAYX_VS1053_H_
 #define KAYX_VS1053_H_
 
@@ -34,11 +41,15 @@
     static const uint8_t SCI_AICTRL2     = 0x0e;
     static const uint8_t SCI_AICTRL3     = 0x0f;
     
+    static const uint8_t SM_RESET        = 2;
+    static const uint8_t SM_SDINEW       = 11;
+    
     VS1053(PinName mosiPin, PinName misoPin, PinName sckPin,
            PinName csPin, PinName bsyncPin, PinName dreqPin, PinName rstPin,
            uint32_t spiFrequency=1000000);
     ~VS1053();
     void hardwareReset();
+    void modeSwitch(void);
     void sendDataByte(uint8_t data);
     size_t sendDataBlock(uint8_t* data, size_t length);
     void clockUp();