Fixed bug 2991714.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1886 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-04-24 11:21:23 +00:00
parent 48ce328ea4
commit af639f7aa4
1 changed files with 7 additions and 2 deletions

View File

@ -460,7 +460,10 @@ bool_t mmcStopSequentialRead(MMCDriver *mmcp) {
chSysUnlock();
spiSend(mmcp->mmc_spip, sizeof(stopcmd), stopcmd);
result = recvr1(mmcp) != 0x00;
/* result = recvr1(mmcp) != 0x00;*/
/* Note, ignored r1 response, it can be not zero, unknown issue.*/
recvr1(mmcp);
result = FALSE;
spiUnselect(mmcp->mmc_spip);
chSysLock();
@ -530,8 +533,10 @@ bool_t mmcSequentialWrite(MMCDriver *mmcp, const uint8_t *buffer) {
spiSend(mmcp->mmc_spip, MMC_SECTOR_SIZE, buffer); /* Data. */
spiIgnore(mmcp->mmc_spip, 2); /* CRC ignored. */
spiReceive(mmcp->mmc_spip, 1, b);
if ((b[0] & 0x1F) == 0x05)
if ((b[0] & 0x1F) == 0x05) {
wait(mmcp);
return FALSE;
}
/* Error.*/
spiUnselect(mmcp->mmc_spip);