mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-21 19:21:52 +00:00
and return NFC_EDEVNOTSUPP for cases not yet supported, depending on the chipset.
Little helper to debug future additions to that function:
// LIBNFC_LOG_LEVEL=193 ./nfc-testing
int
main(void)
{
nfc_device *pnd;
nfc_modulation nm = { .nmt = NMT_ISO14443A, .nbr = NBR_106, };
nfc_context *context;
nfc_init(&context);
pnd = nfc_open(context, NULL);
nfc_initiator_init(pnd);
nfc_target nt;
nfc_initiator_select_passive_target(pnd, nm, NULL, 0, &nt);
while (nfc_initiator_target_is_present(pnd, NULL) == NFC_SUCCESS);
nfc_close(pnd);
nfc_exit(context);
}