Update nfc_initiator_transceive_bytes() vs. nfc_initiator_transceive_dep_bytes().
nfc_initiator_transceive_dep_bytes() was removed, and nfc_initiator_transceive_bytes() is now configured to behave like the one or the other of the original functions. For details, see: http://code.google.com/p/libnfc/source/detail?r=592
This commit is contained in:
parent
70f2fe2685
commit
036d2956f4
3 changed files with 5 additions and 3 deletions
|
@ -83,7 +83,7 @@
|
|||
do { \
|
||||
errno = 0; \
|
||||
DEBUG_XFER (msg, __##msg##_n, "===> "); \
|
||||
if (!(nfc_initiator_transceive_dep_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \
|
||||
if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \
|
||||
nfc_perror (tag->device, __FUNCTION__); \
|
||||
if (disconnect) \
|
||||
tag->active = false; \
|
||||
|
|
|
@ -277,6 +277,7 @@ mifare_desfire_connect (MifareTag tag)
|
|||
errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
nfc_configure (tag->device, NDO_EASY_FRAMING, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -295,6 +296,7 @@ mifare_desfire_disconnect (MifareTag tag)
|
|||
if (nfc_initiator_deselect_target (tag->device)) {
|
||||
tag->active = 0;
|
||||
}
|
||||
nfc_configure (tag->device, NDO_EASY_FRAMING, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
do { \
|
||||
errno = 0; \
|
||||
DEBUG_XFER (msg, __##msg##_n, "===> "); \
|
||||
if (!(nfc_initiator_transceive_dep_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \
|
||||
if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \
|
||||
return errno = EIO, -1; \
|
||||
} \
|
||||
DEBUG_XFER (res, __##res##_n, "<=== "); \
|
||||
|
@ -187,7 +187,7 @@ mifare_ultralight_write (MifareTag tag, const MifareUltralightPageNumber page, c
|
|||
memcpy (cmd + 2, data, sizeof (MifareUltralightPage));
|
||||
|
||||
size_t n;
|
||||
if (!(nfc_initiator_transceive_dep_bytes (tag->device, cmd, sizeof (cmd), NULL, &n))) {
|
||||
if (!(nfc_initiator_transceive_bytes (tag->device, cmd, sizeof (cmd), NULL, &n))) {
|
||||
errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue