From 6206a3c5a5a019bffd2db6fe6e9b3e7aca535fa7 Mon Sep 17 00:00:00 2001 From: barthess Date: Mon, 16 Apr 2012 19:18:14 +0000 Subject: [PATCH] SDC. sdcGetAndClearErrors() now reside in HL driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/sdc_dev2@4100 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/sdc_lld.c | 13 ------------- os/hal/platforms/STM32/sdc_lld.h | 1 - os/hal/src/sdc.c | 4 +++- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c index 0c535e2dc..c42867ffe 100644 --- a/os/hal/platforms/STM32/sdc_lld.c +++ b/os/hal/platforms/STM32/sdc_lld.c @@ -755,19 +755,6 @@ bool_t sdc_lld_write(SDCDriver *sdcp, uint32_t startblk, return sdc_lld_write_aligned(sdcp, startblk, buf, n); } -/** - * @brief Get errors from SDC driver and clear error field. - * - * @param[in] sdcp pointer to the @p SDCDriver object - * - * @notapi - */ -sdcflags_t sdc_lld_get_and_clear_errors(SDCDriver *sdcp) { - sdcflags_t flags = sdcp->errors; - sdcp->errors = SDC_NO_ERROR; - return flags; -} - #endif /* HAL_USE_SDC */ /** @} */ diff --git a/os/hal/platforms/STM32/sdc_lld.h b/os/hal/platforms/STM32/sdc_lld.h index 000100396..437ca9c1d 100644 --- a/os/hal/platforms/STM32/sdc_lld.h +++ b/os/hal/platforms/STM32/sdc_lld.h @@ -246,7 +246,6 @@ extern "C" { uint8_t *buf, uint32_t n); bool_t sdc_lld_write(SDCDriver *sdcp, uint32_t startblk, const uint8_t *buf, uint32_t n); - sdcflags_t sdc_lld_get_and_clear_errors(SDCDriver *sdcp); bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp); bool_t sdc_lld_is_write_protected(SDCDriver *sdcp); #ifdef __cplusplus diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index 10baa38e8..6fd4e211d 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -477,7 +477,9 @@ sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp) { chDbgCheck(sdcp != NULL, "sdcGetAndClearErrors"); - return sdc_lld_get_and_clear_errors(sdcp); + sdcflags_t flags = sdcp->errors; + sdcp->errors = SDC_NO_ERROR; + return flags; } #endif /* HAL_USE_SDC */