mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Sansa AMS: Add MCI_RESPONSE_ERROR macro to make code function more obvious.
MCI_RESPONSE_ERROR covers MCI_CMD_TIMEOUT & MCI_CMD_CRC_FAIL and makes it more clear that these are errors in the response and not the command itself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24003 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7bb00be29d
commit
0f19f4713d
1 changed files with 5 additions and 1 deletions
|
|
@ -86,6 +86,10 @@
|
|||
| MCI_RX_OVERRUN \
|
||||
| MCI_START_BIT_ERR)
|
||||
|
||||
#define MCI_RESPONSE_ERROR \
|
||||
( MCI_CMD_TIMEOUT \
|
||||
| MCI_CMD_CRC_FAIL)
|
||||
|
||||
#define MCI_FIFO(i) ((unsigned long *) (pl180_base[i]+0x80))
|
||||
/* volumes */
|
||||
#define INTERNAL_AS3525 0 /* embedded SD card */
|
||||
|
|
@ -234,7 +238,7 @@ static bool send_cmd(const int drive, const int cmd, const int arg,
|
|||
{
|
||||
response[0] = MCI_RESP0(drive); /* Always prepare short response */
|
||||
|
||||
if(status & (MCI_CMD_TIMEOUT | MCI_CMD_CRC_FAIL)) /* failed response */
|
||||
if(status & MCI_RESPONSE_ERROR) /* timeout or crc failure */
|
||||
return false;
|
||||
|
||||
if(status & MCI_CMD_RESP_END) /*Response passed CRC check */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue