git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7957 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
Giovanni Di Sirio 2015-05-09 11:03:02 +00:00
parent 6f8e0e257e
commit 8adbd4daae
1 changed files with 6 additions and 3 deletions

View File

@ -965,18 +965,21 @@ bool sdcErase(SDCDriver *sdcp, uint32_t startblk, uint32_t endblk) {
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_START,
startblk, resp) != HAL_SUCCESS) ||
MMCSD_R1_ERROR(resp[0]))
MMCSD_R1_ERROR(resp[0])) {
goto failed;
}
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_END,
endblk, resp) != HAL_SUCCESS) ||
MMCSD_R1_ERROR(resp[0]))
MMCSD_R1_ERROR(resp[0])) {
goto failed;
}
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE,
0, resp) != HAL_SUCCESS) ||
MMCSD_R1_ERROR(resp[0]))
MMCSD_R1_ERROR(resp[0])) {
goto failed;
}
/* Quick sleep to allow it to transition to programming or receiving state */
/* TODO: ??????????????????????????? */