|
SD WIFI问题:GetCommandResponse
[复制链接]
PUCHAR respBuff; // response buffer
case ResponseR4:
//--- SHORT RESPONSE (48 bits total)---
// Format: { START_BIT(1) | TRANSMISSION_BIT(1) | RESERVED(6) | CARD_STATUS(32) | RESERVED(7) | END_BIT(1) }
//
RETAILMSG (1,(TEXT("GetCommandResponse (CMD:%d)\n"), pRequest->CommandCode));
*(respBuff ) = (BYTE)(START_BIT | TRANSMISSION_BIT | START_RESERVED);
*(respBuff + 1) = (BYTE)(MES_SDHC_GetShortResponse(SDHC0) );
*(respBuff + 2) = (BYTE)(MES_SDHC_GetShortResponse(SDHC0) >> 8 );
*(respBuff + 3) = (BYTE)(MES_SDHC_GetShortResponse(SDHC0) >> 16);
*(respBuff + 4) = (BYTE)(MES_SDHC_GetShortResponse(SDHC0) >> 24);
*(respBuff + 5) = (BYTE)(END_RESERVED | END_BIT);
memcpy(&pRequest->CommandResponse.ResponseBuffer,&respBuff,4);
break;
哪位前辈帮我看下,上面这样写有问题吗?
在卡的识别时,发CMD5,现在返回CMD5 Response,怎么让BUS解析这个Response
是这样用memcpy(&pRequest->CommandResponse.ResponseBuffer,&respBuff,4);吗
我现在问题是发CMD5命令,感觉没得到相应的Response.
在下是菜鸟一个,还望大虾们不吝赐教!!
|
|