From 973d8da5eabeead58445937e5be4c740ffaf2c56 Mon Sep 17 00:00:00 2001 From: barthess Date: Mon, 16 Apr 2012 18:19:34 +0000 Subject: SDC. Added function sdcGetAndClearErrors. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/sdc_dev2@4099 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/sdc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'os/hal/src') diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index 6cb6dbe06..10baa38e8 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -465,6 +465,21 @@ bool_t sdcWrite(SDCDriver *sdcp, uint32_t startblk, return status; } +/** + * @brief Returns the errors mask associated to the previous operation. + * + * @param[in] sdcp pointer to the @p SDCDriver object + * @return The errors mask. + * + * @api + */ +sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp) { + + chDbgCheck(sdcp != NULL, "sdcGetAndClearErrors"); + + return sdc_lld_get_and_clear_errors(sdcp); +} + #endif /* HAL_USE_SDC */ /** @} */ -- cgit v1.2.3