diff options
author | Jack Halpin <jack.halpin@gmail.com> | 2009-12-15 06:11:29 +0000 |
---|---|---|
committer | Jack Halpin <jack.halpin@gmail.com> | 2009-12-15 06:11:29 +0000 |
commit | 0f19f4713d3fa7a9857d16820894654207044388 (patch) | |
tree | 06380fc52a3ddaa246f4dec3daf15b6dbf06a661 | |
parent | 7bb00be29d44268f93d84d894f9b7181fca06a81 (diff) | |
download | rockbox-0f19f4713d3fa7a9857d16820894654207044388.tar.gz rockbox-0f19f4713d3fa7a9857d16820894654207044388.zip |
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
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 754b1ec749..85b1daff5e 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -86,6 +86,10 @@ | |||
86 | | MCI_RX_OVERRUN \ | 86 | | MCI_RX_OVERRUN \ |
87 | | MCI_START_BIT_ERR) | 87 | | MCI_START_BIT_ERR) |
88 | 88 | ||
89 | #define MCI_RESPONSE_ERROR \ | ||
90 | ( MCI_CMD_TIMEOUT \ | ||
91 | | MCI_CMD_CRC_FAIL) | ||
92 | |||
89 | #define MCI_FIFO(i) ((unsigned long *) (pl180_base[i]+0x80)) | 93 | #define MCI_FIFO(i) ((unsigned long *) (pl180_base[i]+0x80)) |
90 | /* volumes */ | 94 | /* volumes */ |
91 | #define INTERNAL_AS3525 0 /* embedded SD card */ | 95 | #define INTERNAL_AS3525 0 /* embedded SD card */ |
@@ -234,7 +238,7 @@ static bool send_cmd(const int drive, const int cmd, const int arg, | |||
234 | { | 238 | { |
235 | response[0] = MCI_RESP0(drive); /* Always prepare short response */ | 239 | response[0] = MCI_RESP0(drive); /* Always prepare short response */ |
236 | 240 | ||
237 | if(status & (MCI_CMD_TIMEOUT | MCI_CMD_CRC_FAIL)) /* failed response */ | 241 | if(status & MCI_RESPONSE_ERROR) /* timeout or crc failure */ |
238 | return false; | 242 | return false; |
239 | 243 | ||
240 | if(status & MCI_CMD_RESP_END) /*Response passed CRC check */ | 244 | if(status & MCI_CMD_RESP_END) /*Response passed CRC check */ |