rename nfc_disconnect() function to nfc_close().
This commit is contained in:
parent
9d3ca39a44
commit
9eb37b3eee
35 changed files with 80 additions and 80 deletions
|
|
@ -52,6 +52,6 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
// Disconnect from NFC device
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ main (int argc, char *argv[])
|
|||
// Send the 7 bits request command specified in ISO 14443A (0x26)
|
||||
if (!transmit_bits (abtReqa, 7)) {
|
||||
printf ("Error: No tag available\n");
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
return 1;
|
||||
}
|
||||
memcpy (abtAtqa, abtRx, 2);
|
||||
|
|
@ -312,6 +312,6 @@ main (int argc, char *argv[])
|
|||
print_hex (abtAts, szAts);
|
||||
}
|
||||
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,6 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
|
||||
error:
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,6 @@ main (int argc, const char *argv[])
|
|||
printf("Data sent.\n");
|
||||
|
||||
error:
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,13 +196,13 @@ main(int argc, char *argv[])
|
|||
goto error;
|
||||
}
|
||||
|
||||
nfc_disconnect(pnd);
|
||||
nfc_close(pnd);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
error:
|
||||
if (pnd) {
|
||||
nfc_perror (pnd, argv[0]);
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ intr_hdlr (void)
|
|||
{
|
||||
printf ("\nQuitting...\n");
|
||||
if (pnd != NULL) {
|
||||
nfc_disconnect(pnd);
|
||||
nfc_close(pnd);
|
||||
}
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ main (int argc, char *argv[])
|
|||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
nfc_disconnect(pnd);
|
||||
nfc_close(pnd);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,10 +216,10 @@ main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
error:
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ main (int argc, const char *argv[])
|
|||
printf ("NFC device will poll during %ld ms (%u pollings of %lu ms for %zd modulations)\n", (unsigned long) uiPollNr * szModulations * uiPeriod * 150, uiPollNr, (unsigned long) uiPeriod * 150, szModulations);
|
||||
if ((res = nfc_initiator_poll_target (pnd, nmModulations, szModulations, uiPollNr, uiPeriod, &nt)) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_poll_target");
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +128,6 @@ main (int argc, const char *argv[])
|
|||
} else {
|
||||
printf ("No target found.\n");
|
||||
}
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ main (int argc, char *argv[])
|
|||
|
||||
if ((szReaderRxBits = nfc_target_init (pndTag, &nt, abtReaderRx, sizeof (abtReaderRx), 0)) < 0) {
|
||||
ERR ("%s", "Initialization of NFC emulator failed");
|
||||
nfc_disconnect (pndTag);
|
||||
nfc_close (pndTag);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
printf ("%s", "Configuring emulator settings...");
|
||||
|
|
@ -215,7 +215,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
nfc_disconnect (pndTag);
|
||||
nfc_disconnect (pndReader);
|
||||
nfc_close (pndTag);
|
||||
nfc_close (pndReader);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ main (int argc, const char *argv[])
|
|||
pn53x_SAMConfiguration (pnd, PSM_NORMAL, 0);
|
||||
|
||||
// Disconnect from NFC device
|
||||
nfc_disconnect (pnd);
|
||||
nfc_close (pnd);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,6 +197,6 @@ int main(int argc, const char* argv[])
|
|||
if (input != NULL) {
|
||||
fclose(input);
|
||||
}
|
||||
nfc_disconnect(pnd);
|
||||
nfc_close(pnd);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue