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: TFTLCDwithFastIO FastIO SDFileSystem TouchPanel VS1033 mbed
Revision 4:28900cff8f48, committed 2015-07-16
- Comitter:
- nameless129
- Date:
- Thu Jul 16 12:43:08 2015 +0000
- Parent:
- 3:67e97c846cec
- Child:
- 5:a493361aead2
- Commit message:
- ???????????????
Changed in this revision
| VS1033.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/VS1033.lib Thu Jul 16 11:40:58 2015 +0000 +++ b/VS1033.lib Thu Jul 16 12:43:08 2015 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/nameless129/code/VS1033/#b61cd12eabc5 +https://developer.mbed.org/users/nameless129/code/VS1033/#171effe49517
--- a/main.cpp Thu Jul 16 11:40:58 2015 +0000
+++ b/main.cpp Thu Jul 16 12:43:08 2015 +0000
@@ -251,7 +251,6 @@
//////////////////////////////////////////////////////////////
if(mp3Player_State == MP3_STATE_PLAYREQ)
{
- printf("state:%d\r\n",mp3Player_State);
fp = fopen("/sd/1.mp3", "rb");
SDFileOpenFailCnt = 0;
while(!fp)
@@ -282,7 +281,6 @@
}
if( mp3Player_State == MP3_STATE_PLAYING )
{
- printf("state:%d\r\n",mp3Player_State);
printf("totalSendSize:%d\r\n",mp3_totalSizeSent);
if(mp3_totalSizeSent>=mp3_fileSize) //play song end
@@ -298,22 +296,34 @@
}
if( mp3Player_State == MP3_STATE_STOPREQ )
{
- printf("state:%d\r\n",mp3Player_State);
- mp3.stop();
+ uint16_t returnCode=0;
+ uint16_t stopFailCnt = 0;
+ do
+ {
+ returnCode = mp3.stop();
+ printf("STOP\r\nSTOP CODE:%d\r\n",returnCode);
+
+ if(returnCode != 0)
+ {
+ stopFailCnt++;
+ }
+ if(stopFailCnt >= 10)
+ {
+ printf("ERROR! impossible of stop\r\nSystem STOP\r\n");
+ while(1);
+ }
+ }while(returnCode != 0);
fclose(fp);
fp = NULL;
f_mp3Playwe_Playing = 0;
- printf("stop\r\n");
mp3Player_State = MP3_STATE_STOPPING;
}
if( mp3Player_State == MP3_STATE_STOPPING )
{
- printf("state:%d\r\n",mp3Player_State);
}
if( mp3Player_State == MP3_STATE_VOLCHANGEREQ )
{
- printf("state:%d\r\n",mp3Player_State);
}
}
}