quick_start_example1 is now compiled when running make check or distcheck (Fixes Issue 178)
This commit is contained in:
parent
e76e531d2d
commit
3b657ee547
2 changed files with 18 additions and 9 deletions
|
|
@ -5,13 +5,14 @@
|
|||
#include <stdlib.h>
|
||||
#include <nfc/nfc.h>
|
||||
|
||||
#include "nfc-utils.h"
|
||||
#include "utils/nfc-utils.h"
|
||||
#include "libnfc/chips/pn53x.h"
|
||||
|
||||
int
|
||||
main (int argc, const char *argv[])
|
||||
{
|
||||
nfc_device *pnd;
|
||||
nfc_target_info nti;
|
||||
nfc_target nt;
|
||||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
|
|
@ -34,17 +35,17 @@ main (int argc, const char *argv[])
|
|||
.nmt = NMT_ISO14443A,
|
||||
.nbr = NBR_106,
|
||||
};
|
||||
if (nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
|
||||
if (nfc_initiator_select_passive_target (pnd, nmMifare, NULL, 0, &nt)) {
|
||||
printf ("The following (NFC) ISO14443A tag was found:\n");
|
||||
printf (" ATQA (SENS_RES): ");
|
||||
print_hex (nti.nai.abtAtqa, 2);
|
||||
printf (" UID (NFCID%c): ", (nti.nai.abtUid[0] == 0x08 ? '3' : '1'));
|
||||
print_hex (nti.nai.abtUid, nti.nai.szUidLen);
|
||||
print_hex (nt.nti.nai.abtAtqa, 2);
|
||||
printf (" UID (NFCID%c): ", (nt.nti.nai.abtUid[0] == 0x08 ? '3' : '1'));
|
||||
print_hex (nt.nti.nai.abtUid, nt.nti.nai.szUidLen);
|
||||
printf (" SAK (SEL_RES): ");
|
||||
print_hex (&nti.nai.btSak, 1);
|
||||
if (nti.nai.szAtsLen) {
|
||||
print_hex (&nt.nti.nai.btSak, 1);
|
||||
if (nt.nti.nai.szAtsLen) {
|
||||
printf (" ATS (ATR): ");
|
||||
print_hex (nti.nai.abtAts, nti.nai.szAtsLen);
|
||||
print_hex (nt.nti.nai.abtAts, nt.nti.nai.szAtsLen);
|
||||
}
|
||||
}
|
||||
// Disconnect from NFC device
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue