initiator_select_passive_target(): now supports all speeds for ISO14443-4A tags
This commit is contained in:
parent
108de27c1b
commit
ddde2dd8f2
1 changed files with 9 additions and 1 deletions
|
@ -1143,7 +1143,7 @@ pn53x_initiator_select_passive_target_ext(struct nfc_device *pnd,
|
|||
} 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 @@ pn53x_initiator_select_passive_target_ext(struct nfc_device *pnd,
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue