aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-16 19:18:14 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-16 19:18:14 +0000
commit6206a3c5a5a019bffd2db6fe6e9b3e7aca535fa7 (patch)
tree6065c12ce7be6b8bee3ad37994a61db6b6e02b11
parent973d8da5eabeead58445937e5be4c740ffaf2c56 (diff)
downloadChibiOS-6206a3c5a5a019bffd2db6fe6e9b3e7aca535fa7.tar.gz
ChibiOS-6206a3c5a5a019bffd2db6fe6e9b3e7aca535fa7.tar.bz2
ChibiOS-6206a3c5a5a019bffd2db6fe6e9b3e7aca535fa7.zip
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
-rw-r--r--os/hal/platforms/STM32/sdc_lld.c13
-rw-r--r--os/hal/platforms/STM32/sdc_lld.h1
-rw-r--r--os/hal/src/sdc.c4
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 */