Cleanup of initializations
This commit is contained in:
parent
5f890fedcc
commit
4124dc662d
11 changed files with 85 additions and 159 deletions
|
|
@ -174,21 +174,11 @@ main (int argc, const char *argv[])
|
|||
// Set connected NFC device to initiator mode
|
||||
nfc_initiator_init (pnd);
|
||||
|
||||
// Drop the field for a while
|
||||
if (!nfc_configure (pnd, NDO_ACTIVATE_FIELD, false)) {
|
||||
nfc_perror (pnd, "nfc_configure");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
// Let the reader only try once to find a tag
|
||||
if (!nfc_configure (pnd, NDO_INFINITE_SELECT, false)) {
|
||||
nfc_perror (pnd, "nfc_configure");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
// Enable field so more power consuming cards can power themselves up
|
||||
if (!nfc_configure (pnd, NDO_ACTIVATE_FIELD, true)) {
|
||||
nfc_perror (pnd, "nfc_configure");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
// Read the SAM's info
|
||||
const nfc_modulation_t nmSAM = {
|
||||
.nmt = NMT_ISO14443A,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue