diff options
author | Uladzimir Pylinski <barthess@yandex.ru> | 2015-02-19 15:26:42 +0000 |
---|---|---|
committer | Uladzimir Pylinski <barthess@yandex.ru> | 2015-02-19 15:26:42 +0000 |
commit | 39592bc15c28d5294a8b219153822d49f0efa145 (patch) | |
tree | 5625ec8be74c499cd7f64d37ddc8cbcacd3a4a7b /os/hal/src | |
parent | 7c1422770ef052e4509a27210a4262797df351ed (diff) | |
download | ChibiOS-39592bc15c28d5294a8b219153822d49f0efa145.tar.gz ChibiOS-39592bc15c28d5294a8b219153822d49f0efa145.tar.bz2 ChibiOS-39592bc15c28d5294a8b219153822d49f0efa145.zip |
SDIO. Deleted unused erase function.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7693 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/sdc.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index 73ea60fbe..bdd6bddea 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -857,65 +857,6 @@ bool sdcGetInfo(SDCDriver *sdcp, BlockDeviceInfo *bdip) { return HAL_SUCCESS;
}
-/**
- * @brief Erases the supplied blocks.
- *
- * @param[in] sdcp pointer to the @p SDCDriver object
- * @param[in] startblk starting block number
- * @param[in] endblk ending block number
- *
- * @return The operation status.
- * @retval HAL_SUCCESS the operation succeeded.
- * @retval HAL_FAILED the operation failed.
- *
- * @api
- */
-bool sdcErase(SDCDriver *sdcp, uint32_t startblk, uint32_t endblk) {
- uint32_t resp[1];
-
- osalDbgCheck((sdcp != NULL));
- osalDbgAssert(sdcp->state == BLK_READY, "invalid state");
-
- /* Erase operation in progress.*/
- sdcp->state = BLK_WRITING;
-
- /* Handling command differences between HC and normal cards.*/
- if (!(sdcp->cardmode & SDC_MODE_HIGH_CAPACITY)) {
- startblk *= MMCSD_BLOCK_SIZE;
- endblk *= MMCSD_BLOCK_SIZE;
- }
-
- _sdc_wait_for_transfer_state(sdcp);
-
- if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE_RW_BLK_START,
- startblk, resp) != HAL_SUCCESS) ||
- 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]))
- goto failed;
-
- if ((sdc_lld_send_cmd_short_crc(sdcp, MMCSD_CMD_ERASE,
- 0, resp) != HAL_SUCCESS) ||
- MMCSD_R1_ERROR(resp[0]))
- goto failed;
-
- /* Quick sleep to allow it to transition to programming or receiving state */
- /* TODO: ??????????????????????????? */
-
- /* Wait for it to return to transfer state to indicate it has finished erasing */
- _sdc_wait_for_transfer_state(sdcp);
-
- sdcp->state = BLK_READY;
- return HAL_SUCCESS;
-
-failed:
- sdcp->state = BLK_READY;
- return HAL_FAILED;
-}
-
#endif /* HAL_USE_SDC */
/** @} */
|