Revision: ddde2dd8f274
Author: Philippe Teuwen <
yob...@gmail.com>
Date: Mon Mar 10 23:13:26 2014 UTC
Log: initiator_select_passive_target(): now supports all speeds for
ISO14443-4A tags
http://code.google.com/p/libnfc/source/detail?r=ddde2dd8f274
Modified:
/libnfc/chips/pn53x.c
=======================================
--- /libnfc/chips/pn53x.c Tue Mar 4 00:47:42 2014 UTC
+++ /libnfc/chips/pn53x.c Mon Mar 10 23:13:26 2014 UTC
@@ -1143,7 +1143,7 @@
} else {
const pn53x_modulation pm = pn53x_nm_to_pm(nm);
- if (PM_UNDEFINED == pm) {
+ if ((PM_UNDEFINED == pm)||(NBR_UNDEFINED == nm.nbr)) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
@@ -1158,6 +1158,14 @@
if ((res = pn53x_decode_target_data(abtTargetsData + 1, szTargetsData
- 1, CHIP_DATA(pnd)->type, nm.nmt, &(nttmp.nti))) < 0) {
return res;
}
+ if (nm.nbr != NBR_106) {
+ uint8_t pncmd_inpsl[4] = { InPSL, 0x01 };
+ pncmd_inpsl[2] = nm.nbr - 1;
+ pncmd_inpsl[3] = nm.nbr - 1;
+ if ((res = pn53x_transceive(pnd, pncmd_inpsl, sizeof(pncmd_inpsl),
NULL, 0, 0)) < 0) {
+ return res;
+ }
+ }
}
if (pn53x_current_target_new(pnd, &nttmp) == NULL) {
pnd->last_error = NFC_ESOFT;