aboutsummaryrefslogtreecommitdiff
path: root/cc3200/fatfs
diff options
context:
space:
mode:
authordanicampora2015-03-15 20:50:56 +0100
committerdanicampora2015-03-16 00:42:13 +0100
commit09623580262ecbd747f4feabd62eceb524ec16af (patch)
tree4f0ebb7613aef14cc81e7aa9baca9f757493e571 /cc3200/fatfs
parent1080802e8f4defc792228cc36d0514f5b6f09e82 (diff)
cc3200: Align SD card driver with new SDK release(1.1.0).
Diffstat (limited to 'cc3200/fatfs')
-rw-r--r--cc3200/fatfs/src/drivers/sd_diskio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc3200/fatfs/src/drivers/sd_diskio.c b/cc3200/fatfs/src/drivers/sd_diskio.c
index fbe73ebde..57ff5ae62 100644
--- a/cc3200/fatfs/src/drivers/sd_diskio.c
+++ b/cc3200/fatfs/src/drivers/sd_diskio.c
@@ -360,6 +360,8 @@ DRESULT sd_disk_read (BYTE* pBuffer, DWORD ulSectorNumber, UINT SectorCount) {
pBuffer += 4;
}
CardSendCmd(CMD_STOP_TRANS, 0);
+ // Wait for the command to complete
+ while (!(MAP_SDHostIntStatus(SDHOST_BASE) & SDHOST_INT_TC));
Res = RES_OK;
}
}
@@ -430,6 +432,8 @@ DRESULT sd_disk_write (const BYTE* pBuffer, DWORD ulSectorNumber, UINT SectorCou
// Wait for transfer complete
while (!(MAP_SDHostIntStatus(SDHOST_BASE) & SDHOST_INT_TC));
CardSendCmd(CMD_STOP_TRANS, 0);
+ // Wait for the command to complete
+ while (!(MAP_SDHostIntStatus(SDHOST_BASE) & SDHOST_INT_TC));
Res = RES_OK;
}
}