nfc_initiator_transceive_bits() function returns now received bits count on success and libnfc error code on failure.
This commit is contained in:
parent
d6477df7a6
commit
61074f3497
9 changed files with 19 additions and 17 deletions
|
|
@ -98,7 +98,8 @@ transmit_bits (const uint8_t *pbtTx, const size_t szTxBits)
|
|||
printf ("Sent bits: ");
|
||||
print_hex_bits (pbtTx, szTxBits);
|
||||
// Transmit the bit frame command, we don't use the arbitrary parity feature
|
||||
if (!nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, &szRxBits, NULL))
|
||||
int res = 0;
|
||||
if ((res = nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, &szRxBits, NULL)) < 0)
|
||||
return false;
|
||||
|
||||
// Show received answer
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ transmit_bits (const uint8_t *pbtTx, const size_t szTxBits)
|
|||
print_hex_bits (pbtTx, szTxBits);
|
||||
}
|
||||
// Transmit the bit frame command, we don't use the arbitrary parity feature
|
||||
if (!nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, &szRxBits, NULL))
|
||||
if (nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, &szRxBits, NULL) < 0)
|
||||
return false;
|
||||
|
||||
// Show received answer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue