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.
Dependents: W7500_and_VS1053_MP3_decoder VS1053_MP3_decoder_WIZwiki-W7500 VS1053Player Scat
Fork of VS1053 by
Diff: VS1053.cpp
- Revision:
- 7:97a8edd44fe9
- Parent:
- 6:1f57fbd3aeb5
- Child:
- 8:5ad25d480d5f
diff -r 1f57fbd3aeb5 -r 97a8edd44fe9 VS1053.cpp
--- a/VS1053.cpp Fri Dec 20 21:34:03 2013 +0000
+++ b/VS1053.cpp Sat Sep 05 12:16:06 2015 +0000
@@ -1,8 +1,15 @@
-// ==================================================== Dec 21 2013, kayeks ==
-// VS1053.cpp
-// ===========================================================================
-// 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.
+ *
+ *
+ */
#include "mbed.h"
#include "VS1053.h"
@@ -39,6 +46,20 @@
wait(.05);
}
+/** Patch for some LC Technology VS1053 board with "no sound" problem.
+ * 5 September 2015 bby Vassilis Serasidis
+ */
+void VS1053::modeSwitch(void)
+{
+ //GPIO_DDR
+ writeReg(SCI_WRAMADDR, 0xc017);
+ writeReg(SCI_WRAM, 0x0003);
+
+ wait(.05);
+ writeReg(SCI_MODE, (1<<SM_SDINEW) | (1<<SM_RESET));
+ wait(.05);
+}
+
/** Send a data byte to VS1053. */
void VS1053::sendDataByte(uint8_t data) {
while (!dreq);
