Rename nfc_modulation_t as pn53x_modulation_t

This commit is contained in:
Romuald Conty 2010-10-13 15:39:52 +00:00
parent 695e5c2f37
commit 9020014160
12 changed files with 72 additions and 72 deletions

View file

@ -32,7 +32,7 @@ main (int argc, const char *argv[])
printf ("Connected to NFC reader: %s\n", pnd->acName);
// Poll for a ISO14443A (MIFARE) tag
if (nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
printf ("The following (NFC) ISO14443A tag was found:\n");
printf (" ATQA (SENS_RES): ");
print_hex (nti.nai.abtAtqa, 2);

View file

@ -62,7 +62,7 @@ main (int argc, const char *argv[])
return EXIT_FAILURE;
}
if(!nfc_initiator_select_dep_target (pnd, NM_PASSIVE_DEP, NULL, &nti)) {
if(!nfc_initiator_select_dep_target (pnd, PM_PASSIVE_DEP, NULL, &nti)) {
nfc_perror(pnd, "nfc_initiator_select_dep_target");
return EXIT_FAILURE;
}

View file

@ -142,7 +142,7 @@ main (int argc, const char *argv[])
printf ("Connected to NFC device: %s\n", pnd->acName);
// List ISO14443A targets
if (nfc_initiator_list_passive_targets (pnd, NM_ISO14443A_106, anti, MAX_TARGET_COUNT, &szTargetFound)) {
if (nfc_initiator_list_passive_targets (pnd, PM_ISO14443A_106, anti, MAX_TARGET_COUNT, &szTargetFound)) {
size_t n;
printf ("%d ISO14443A passive target(s) was found%s\n", (int) szTargetFound, (szTargetFound == 0) ? ".\n" : ":");
for (n = 0; n < szTargetFound; n++) {
@ -151,7 +151,7 @@ main (int argc, const char *argv[])
}
}
// List Felica tags
if (nfc_initiator_list_passive_targets (pnd, NM_FELICA_212, anti, MAX_TARGET_COUNT, &szTargetFound)) {
if (nfc_initiator_list_passive_targets (pnd, PM_FELICA_212, anti, MAX_TARGET_COUNT, &szTargetFound)) {
size_t n;
printf ("%d Felica (212 kbps) passive target(s) was found%s\n", (int) szTargetFound,
(szTargetFound == 0) ? ".\n" : ":");
@ -160,7 +160,7 @@ main (int argc, const char *argv[])
printf ("\n");
}
}
if (nfc_initiator_list_passive_targets (pnd, NM_FELICA_424, anti, MAX_TARGET_COUNT, &szTargetFound)) {
if (nfc_initiator_list_passive_targets (pnd, PM_FELICA_424, anti, MAX_TARGET_COUNT, &szTargetFound)) {
size_t n;
printf ("%d Felica (424 kbps) passive target(s) was found%s\n", (int) szTargetFound,
(szTargetFound == 0) ? ".\n" : ":");
@ -170,7 +170,7 @@ main (int argc, const char *argv[])
}
}
// List ISO14443B targets
if (nfc_initiator_list_passive_targets (pnd, NM_ISO14443B_106, anti, MAX_TARGET_COUNT, &szTargetFound)) {
if (nfc_initiator_list_passive_targets (pnd, PM_ISO14443B_106, anti, MAX_TARGET_COUNT, &szTargetFound)) {
size_t n;
printf ("%d ISO14443B passive target(s) was found%s\n", (int) szTargetFound, (szTargetFound == 0) ? ".\n" : ":");
for (n = 0; n < szTargetFound; n++) {
@ -180,7 +180,7 @@ main (int argc, const char *argv[])
}
// List Jewel targets
if (nfc_initiator_list_passive_targets(pnd, NM_JEWEL_106, anti, MAX_TARGET_COUNT, &szTargetFound )) {
if (nfc_initiator_list_passive_targets(pnd, PM_JEWEL_106, anti, MAX_TARGET_COUNT, &szTargetFound )) {
size_t n;
printf("%d Jewel passive target(s) was found%s\n", (int)szTargetFound, (szTargetFound==0)?".\n":":");
for(n=0; n<szTargetFound; n++) {

View file

@ -150,7 +150,7 @@ authenticate (uint32_t uiBlock)
return true;
}
nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, mp.mpa.abtUid, 4, NULL);
nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, mp.mpa.abtUid, 4, NULL);
}
}
@ -177,7 +177,7 @@ read_card (void)
// Show if the readout went well
if (bFailure) {
// When a failure occured we need to redo the anti-collision
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
printf ("!\nError: tag was removed\n");
return false;
}
@ -242,7 +242,7 @@ write_card (void)
// Show if the readout went well
if (bFailure) {
// When a failure occured we need to redo the anti-collision
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
printf ("!\nError: tag was removed\n");
return false;
}
@ -442,7 +442,7 @@ main (int argc, const char *argv[])
printf ("Connected to NFC reader: %s\n", pnd->acName);
// Try to find a MIFARE Classic tag
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
printf ("Error: no tag was found\n");
nfc_disconnect (pnd);
exit (EXIT_FAILURE);

View file

@ -116,7 +116,7 @@ write_card (void)
// Show if the readout went well
if (bFailure) {
// When a failure occured we need to redo the anti-collision
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
ERR ("tag was removed");
return false;
}
@ -216,7 +216,7 @@ main (int argc, const char *argv[])
printf ("Connected to NFC device: %s\n", pnd->acName);
// Try to find a MIFARE Ultralight tag
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
ERR ("no tag was found\n");
nfc_disconnect (pnd);
return 1;

View file

@ -181,7 +181,7 @@ main (int argc, const char *argv[])
exit (EXIT_FAILURE);
}
// Read the SAM's info
if (!nfc_initiator_select_passive_target (pnd, NM_ISO14443A_106, NULL, 0, &nti)) {
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
nfc_perror (pnd, "nfc_initiator_select_passive_target");
ERR ("%s", "Reading of SAM info failed.");
return EXIT_FAILURE;