pn53x: handle properly ReadRegister of PN533

This commit is contained in:
Philippe Teuwen
2010-10-01 17:42:16 +00:00
parent ae522c843c
commit c937e8d178
2 changed files with 15 additions and 12 deletions

View File

@@ -367,14 +367,6 @@ pn53x_usb_transceive (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szT
// Remove the preceding and appending bytes 00 00 FF xx Fx .. .. .. xx 00 (x = variable)
*pszRxLen = ret - 7 - 2;
// Get register: nuke extra byte (awful hack)
if ((abtRx[5] == 0xd5) && (abtRx[6] == 0x07) && (*pszRxLen == 2)) {
// DBG("awful hack: abtRx[7]=%02x, abtRx[8]=%02x, we only keep abtRx[8]=%02x", abtRx[7], abtRx[8], abtRx[8]);
*pszRxLen = (*pszRxLen) - 1;
memcpy (pbtRx, abtRx + 8, *pszRxLen);
return true;
}
memcpy (pbtRx, abtRx + 7, *pszRxLen);
return true;