examples/nfc-emulate-forum-tag4: this example now fails with ENOTSUPP when used with a non-PN532 chip.

This commit is contained in:
Romuald Conty 2011-06-27 09:14:19 +00:00
parent 7b6baafd1d
commit 0b42cbfb8f
2 changed files with 16 additions and 10 deletions

View file

@ -1629,6 +1629,12 @@ pn53x_target_init (nfc_device_t * pnd, nfc_target_t * pnt, byte_t * pbtRx, size_
}
CHIP_DATA (pnd)->current_target = malloc (sizeof(nfc_target_t));
memcpy (CHIP_DATA (pnd)->current_target, pnt, sizeof(nfc_target_t));
if (ptm & PTM_ISO14443_4_PICC_ONLY) {
// When PN532 is in PICC target mode, it automatically reply to RATS so
// we don't need to forward this command
*pszRx = 0;
}
}
}