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: FATFileSystem
Diff: SDFileSystem.cpp
- Revision:
- 25:391eade4ef85
- Parent:
- 24:698affe9560c
- Child:
- 26:8f15aa3b052b
--- a/SDFileSystem.cpp Tue Apr 12 13:47:47 2016 +0000 +++ b/SDFileSystem.cpp Tue Apr 12 18:16:24 2016 +0000 @@ -197,6 +197,8 @@ //Make sure the card is initialized before proceeding if (m_Status & STA_NOINIT) return RES_NOTRDY; + __DSB(); + __ISB(); while(BSP_SD_Get_Busy()==1){;} BSP_SD_Set_Busy(); //Read a single block, or multiple blocks @@ -223,6 +225,8 @@ //Make sure the card is initialized before proceeding if (m_Status & STA_NOINIT) return RES_NOTRDY; + __DSB(); + __ISB(); while(BSP_SD_Get_Busy()==1){;} BSP_SD_Set_Busy(); //Make sure the card isn't write protected before proceeding @@ -253,6 +257,8 @@ int SDFileSystem::disk_sync() { //Select the card so we're forced to wait for the end of any internal write processes + __DSB(); + __ISB(); while(BSP_SD_Get_Busy()==1){;} BSP_SD_Set_Busy(); while(BSP_SD_GetStatus()==SD_TRANSFER_BUSY){;} @@ -272,6 +278,8 @@ //Make sure the card is initialized before proceeding if (m_Status & STA_NOINIT) return 0; + __DSB(); + __ISB(); while(BSP_SD_Get_Busy()==1){;} BSP_SD_Set_Busy(); BSP_SD_GetCardInfo(&m_CardInfo);