Information Technology Reference
In-Depth Information
// If the first byte was read, read the second byte.
if (response.r2._byte0 != 0xFF)
response.r2._byte1 = ReadMedia();
}
// Is the response type R1b?
if (sdmmc_cmdtable[cmd].responsetype == R1b)
{
// The R1b response byte has been read.
// Wait for not busy status by reading from the card until a byte doesn't equal 00h
// or a timeout occurs..
response.r1._byte = 0x00;
for (index = 0; index < 0xFF && response.r1._byte == 0x00; index++)
{
timeout = 0xFFFF;
do
{
response.r1._byte = ReadMedia();
timeout--;
} while ((response.r1._byte == 0x00) && (timeout != 0));
}
}
// Generate 8 clock cycles.
mSend8ClkCycles();
// If no more data is expected for this command, deselect the card.
if (!(sdmmc_cmdtable[cmd].moredataexpected))
SDC_CS = 1;
return(response);
}
Search WWH ::




Custom Search