mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-03 14:21:47 +00:00
nfc_initiator_transceive_bits() function does not now use pszRxBits as parameter because this function returns it.
This commit is contained in:
@@ -82,7 +82,7 @@ static size_t num_keys = sizeof (keys) / 6;
|
||||
#define MAX_FRAME_LEN 264
|
||||
|
||||
static uint8_t abtRx[MAX_FRAME_LEN];
|
||||
static size_t szRxBits;
|
||||
static int szRxBits;
|
||||
static size_t szRx = sizeof(abtRx);
|
||||
|
||||
uint8_t abtHalt[4] = { 0x50, 0x00, 0x00, 0x00 };
|
||||
@@ -98,8 +98,7 @@ 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
|
||||
int res = 0;
|
||||
if ((res = nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, &szRxBits, NULL)) < 0)
|
||||
if ((szRxBits = nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, NULL)) < 0)
|
||||
return false;
|
||||
|
||||
// Show received answer
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#define MAX_FRAME_LEN 264
|
||||
|
||||
static uint8_t abtRx[MAX_FRAME_LEN];
|
||||
static size_t szRxBits;
|
||||
static int szRxBits;
|
||||
static size_t szRx = sizeof(abtRx);
|
||||
static uint8_t abtRawUid[12];
|
||||
static uint8_t abtAtqa[2];
|
||||
@@ -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) < 0)
|
||||
if ((szRxBits = nfc_initiator_transceive_bits (pnd, pbtTx, szTxBits, NULL, abtRx, NULL)) < 0)
|
||||
return false;
|
||||
|
||||
// Show received answer
|
||||
|
||||
Reference in New Issue
Block a user