drivers: fix bug on receive: all pn53x_transceive after an error were flagged as erroneous
This commit is contained in:
parent
cad3dc652d
commit
c0a38e6eb0
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue