git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7957 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
6f8e0e257e
commit
8adbd4daae
|
@ -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,
|
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_START,
|
||||||
startblk, resp) != HAL_SUCCESS) ||
|
startblk, resp) != HAL_SUCCESS) ||
|
||||||
MMCSD_R1_ERROR(resp[0]))
|
MMCSD_R1_ERROR(resp[0])) {
|
||||||
goto failed;
|
goto failed;
|
||||||
|
}
|
||||||
|
|
||||||
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_END,
|
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_END,
|
||||||
endblk, resp) != HAL_SUCCESS) ||
|
endblk, resp) != HAL_SUCCESS) ||
|
||||||
MMCSD_R1_ERROR(resp[0]))
|
MMCSD_R1_ERROR(resp[0])) {
|
||||||
goto failed;
|
goto failed;
|
||||||
|
}
|
||||||
|
|
||||||
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE,
|
if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE,
|
||||||
0, resp) != HAL_SUCCESS) ||
|
0, resp) != HAL_SUCCESS) ||
|
||||||
MMCSD_R1_ERROR(resp[0]))
|
MMCSD_R1_ERROR(resp[0])) {
|
||||||
goto failed;
|
goto failed;
|
||||||
|
}
|
||||||
|
|
||||||
/* Quick sleep to allow it to transition to programming or receiving state */
|
/* Quick sleep to allow it to transition to programming or receiving state */
|
||||||
/* TODO: ??????????????????????????? */
|
/* TODO: ??????????????????????????? */
|
||||||
|
|
Loading…
Reference in New Issue