diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-05-09 11:03:02 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-05-09 11:03:02 +0000 |
commit | 8adbd4daaefb0f42591f70be41163dbe29209281 (patch) | |
tree | 7843d230c3d6994d3c4a882f6942e92273488a28 | |
parent | 6f8e0e257eec0d1b675b410c19d84a24dfc9fea9 (diff) | |
download | ChibiOS-8adbd4daaefb0f42591f70be41163dbe29209281.tar.gz ChibiOS-8adbd4daaefb0f42591f70be41163dbe29209281.tar.bz2 ChibiOS-8adbd4daaefb0f42591f70be41163dbe29209281.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7957 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/src/sdc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index e3cf125dd..40006a6c1 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -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: ??????????????????????????? */
|