diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-16 20:12:16 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-16 20:12:16 +0000 |
commit | 671cb8ab9dbbfaf9832f7529fc8966a5d042b6f4 (patch) | |
tree | 641f1efc7db17ed2a26a7a9be72432a33082479e /os/hal/src/sdc.c | |
parent | 579fffb63c4d932c63882cb643cc95a55d8bf06e (diff) | |
download | ChibiOS-671cb8ab9dbbfaf9832f7529fc8966a5d042b6f4.tar.gz ChibiOS-671cb8ab9dbbfaf9832f7529fc8966a5d042b6f4.tar.bz2 ChibiOS-671cb8ab9dbbfaf9832f7529fc8966a5d042b6f4.zip |
SDC. Reverted from SDC_SUCCESS/SDC_FAILED to boolean values.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/sdc_dev2@4103 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/sdc.c')
-rw-r--r-- | os/hal/src/sdc.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index c2e6c1b74..d883eac39 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -89,8 +89,8 @@ static uint32_t _sdc_get_slice(uint32_t *data, int32_t end, int32_t start) { * @param[in] sdcp pointer to the @p SDCDriver object
*
* @return The operation status.
- * @retval SDC_SUCCESS operation succeeded.
- * @retval SDC_FAILED operation failed.
+ * @retval FALSE operation succeeded.
+ * @retval TRUE operation failed.
*
* @notapi
*/
@@ -101,10 +101,10 @@ bool_t _sdc_wait_for_transfer_state(SDCDriver *sdcp) { if (sdc_lld_send_cmd_short_crc(sdcp, SDC_CMD_SEND_STATUS,
sdcp->rca, resp) ||
SDC_R1_ERROR(resp[0]))
- return SDC_FAILED;
+ return TRUE;
switch (SDC_R1_STS(resp[0])) {
case SDC_STS_TRAN:
- return SDC_SUCCESS;
+ return FALSE;
case SDC_STS_DATA:
case SDC_STS_RCV:
case SDC_STS_PRG:
@@ -115,11 +115,11 @@ bool_t _sdc_wait_for_transfer_state(SDCDriver *sdcp) { default:
/* The card should have been initialized so any other state is not
valid and is reported as an error.*/
- return SDC_FAILED;
+ return TRUE;
}
}
/* If something going too wrong.*/
- return SDC_FAILED;
+ return TRUE;
}
/*===========================================================================*/
@@ -204,8 +204,8 @@ void sdcStop(SDCDriver *sdcp) { * @param[in] sdcp pointer to the @p SDCDriver object
*
* @return The operation status.
- * @retval SDC_SUCCESS operation succeeded.
- * @retval SDC_FAILED operation failed.
+ * @retval FALSE operation succeeded.
+ * @retval TRUE operation failed.
*
* @api
*/
@@ -346,13 +346,13 @@ bool_t sdcConnect(SDCDriver *sdcp) { /* Initialization complete.*/
sdcp->state = SDC_ACTIVE;
- return SDC_SUCCESS;
+ return FALSE;
/* Initialization failed.*/
failed:
sdc_lld_stop_clk(sdcp);
sdcp->state = SDC_READY;
- return SDC_FAILED;
+ return TRUE;
}
/**
@@ -361,8 +361,8 @@ failed: * @param[in] sdcp pointer to the @p SDCDriver object
*
* @return The operation status.
- * @retval SDC_SUCCESS operation succeeded.
- * @retval SDC_FAILED operation failed.
+ * @retval FALSE operation succeeded.
+ * @retval TRUE operation failed.
*
* @api
*/
@@ -375,20 +375,20 @@ bool_t sdcDisconnect(SDCDriver *sdcp) { "sdcDisconnect(), #1", "invalid state");
if (sdcp->state == SDC_READY) {
chSysUnlock();
- return SDC_SUCCESS;
+ return FALSE;
}
sdcp->state = SDC_DISCONNECTING;
chSysUnlock();
/* Waits for eventual pending operations completion.*/
if (_sdc_wait_for_transfer_state(sdcp))
- return SDC_FAILED;
+ return TRUE;
/* Card clock stopped.*/
sdc_lld_stop_clk(sdcp);
sdcp->state = SDC_READY;
- return SDC_SUCCESS;
+ return FALSE;
}
/**
@@ -402,8 +402,8 @@ bool_t sdcDisconnect(SDCDriver *sdcp) { * @param[in] n number of blocks to read
*
* @return The operation status.
- * @retval SDC_SUCCESS operation succeeded.
- * @retval SDC_FAILED operation failed.
+ * @retval FALSE operation succeeded.
+ * @retval TRUE operation failed.
*
* @api
*/
@@ -415,7 +415,7 @@ bool_t sdcRead(SDCDriver *sdcp, uint32_t startblk, if ((startblk + n - 1) > sdcp->capacity){
sdcp->errors |= SDC_OVERFLOW_ERROR;
- return SDC_FAILED;
+ return TRUE;
}
chSysLock();
@@ -439,8 +439,8 @@ bool_t sdcRead(SDCDriver *sdcp, uint32_t startblk, * @param[in] n number of blocks to write
*
* @return The operation status.
- * @retval SDC_SUCCESS operation succeeded.
- * @retval SDC_FAILED operation failed.
+ * @retval FALSE operation succeeded.
+ * @retval TRUE operation failed.
*
* @api
*/
@@ -452,7 +452,7 @@ bool_t sdcWrite(SDCDriver *sdcp, uint32_t startblk, if ((startblk + n - 1) > sdcp->capacity){
sdcp->errors |= SDC_OVERFLOW_ERROR;
- return SDC_FAILED;
+ return TRUE;
}
chSysLock();
|