1
Dependents: internet_radio_leo
Fork of VS1053 by
Diff: VS1053.cpp
- Revision:
- 7:97a8edd44fe9
- Parent:
- 6:1f57fbd3aeb5
- Child:
- 8:e23900b0f1ca
--- 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);