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
master
barthess 2012-04-16 19:18:14 +00:00
parent 973d8da5ea
commit 6206a3c5a5
3 changed files with 3 additions and 15 deletions

View File

@ -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 */
/** @} */

View File

@ -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

View File

@ -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 */