mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-25 05:01:52 +00:00
drivers: fix bug on receive: all pn53x_transceive after an error were flagged as erroneous
This commit is contained in:
@@ -354,6 +354,7 @@ acr122_receive (nfc_device_t * pnd, byte_t * pbtData, const size_t szData)
|
|||||||
memcpy (pbtData, DRIVER_DATA (pnd)->abtRx + 2, len);
|
memcpy (pbtData, DRIVER_DATA (pnd)->abtRx + 2, len);
|
||||||
|
|
||||||
// Transmission went successful
|
// Transmission went successful
|
||||||
|
pnd->iLastError = 0;
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ read:
|
|||||||
pnd->iLastError = DEIO;
|
pnd->iLastError = DEIO;
|
||||||
// try to interrupt current device state
|
// try to interrupt current device state
|
||||||
pn53x_usb_ack(pnd);
|
pn53x_usb_ack(pnd);
|
||||||
return false;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const byte_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
|
const byte_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
|
||||||
@@ -521,6 +521,7 @@ read:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// The PN53x command is done and we successfully received the reply
|
// The PN53x command is done and we successfully received the reply
|
||||||
|
pnd->iLastError = 0;
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user