diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c index f618d7776..ebed7cfa2 100644 --- a/os/hal/platforms/STM32/sdc_lld.c +++ b/os/hal/platforms/STM32/sdc_lld.c @@ -79,8 +79,8 @@ static union { * @param[in] resp pointer to the response buffer * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -117,8 +117,8 @@ static bool_t sdc_lld_prepare_read(SDCDriver *sdcp, uint32_t startblk, * @param[in] resp pointer to the response buffer * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -154,8 +154,8 @@ static bool_t sdc_lld_prepare_write(SDCDriver *sdcp, uint32_t startblk, * @param[in] resp pointer to the response buffer * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. */ static bool_t sdc_lld_wait_transaction_end(SDCDriver *sdcp, uint32_t n, uint32_t *resp){ @@ -488,8 +488,8 @@ void sdc_lld_send_cmd_none(SDCDriver *sdcp, uint8_t cmd, uint32_t arg) { * @param[out] resp pointer to the response buffer (one word) * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -522,8 +522,8 @@ bool_t sdc_lld_send_cmd_short(SDCDriver *sdcp, uint8_t cmd, uint32_t arg, * @param[out] resp pointer to the response buffer (one word) * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -556,8 +556,8 @@ bool_t sdc_lld_send_cmd_short_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg, * @param[out] resp pointer to the response buffer (four words) * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -595,8 +595,8 @@ bool_t sdc_lld_send_cmd_long_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg, * @param[in] n number of blocks to read * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -657,8 +657,8 @@ error: * @param[in] n number of blocks to write * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -718,8 +718,8 @@ error: * @param[in] n number of blocks to read * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ @@ -751,8 +751,8 @@ bool_t sdc_lld_read(SDCDriver *sdcp, uint32_t startblk, * @param[in] n number of blocks to write * * @return The operation status. - * @retval FALSE operation succeeded. - * @retval TRUE operation failed. + * @retval CH_SUCCESS operation succeeded. + * @retval CH_FAILED operation failed. * * @notapi */ diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index 6ae84c98c..7722a0eb7 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -454,8 +454,8 @@ sdcflags_t sdcGetAndClearErrors(SDCDriver *sdcp) { * @param[in] sdcp pointer to the @p SDCDriver object * * @return The operation status. - * @retval FALSE the operation succeeded. - * @retval TRUE the operation failed. + * @retval CH_SUCCESS the operation succeeded. + * @retval CH_FAILED the operation failed. * * @api */ @@ -466,13 +466,13 @@ bool_t sdcSync(SDCDriver *sdcp) { chSysLock(); if (sdcp->state != SDC_READY) { chSysUnlock(); - return TRUE; + return CH_FAILED; } chSysUnlock(); /* TODO: implement.*/ - return FALSE; + return CH_SUCCESS; } /** @@ -482,8 +482,8 @@ bool_t sdcSync(SDCDriver *sdcp) { * @param[out] bdip pointer to a @p BlockDeviceInfo structure * * @return The operation status. - * @retval FALSE the operation succeeded. - * @retval TRUE the operation failed. + * @retval CH_SUCCESS the operation succeeded. + * @retval CH_FAILED the operation failed. * * @api */ @@ -495,14 +495,14 @@ bool_t sdcGetInfo(SDCDriver *sdcp, BlockDeviceInfo *bdip) { chSysLock(); if (sdcp->state != SDC_READY) { chSysUnlock(); - return TRUE; + return CH_FAILED; } chSysUnlock(); bdip->blk_num = sdcp->capacity; bdip->blk_size = MMCSD_BLOCK_SIZE; - return FALSE; + return CH_SUCCESS; } #endif /* HAL_USE_SDC */