mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-20 13:36:19 +00:00
Attempt to provide clean types for API
This commit is contained in:
@@ -181,7 +181,11 @@ main (int argc, const char *argv[])
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
// Read the SAM's info
|
||||
if (!nfc_initiator_select_passive_target (pnd, PM_ISO14443A_106, NULL, 0, &nti)) {
|
||||
const nfc_modulation_t nmSAM = {
|
||||
.nmt = NMT_ISO14443A,
|
||||
.nbr = NBR_106,
|
||||
};
|
||||
if (!nfc_initiator_select_passive_target (pnd, nmSAM, NULL, 0, &nti)) {
|
||||
nfc_perror (pnd, "nfc_initiator_select_passive_target");
|
||||
ERR ("%s", "Reading of SAM info failed.");
|
||||
return EXIT_FAILURE;
|
||||
@@ -198,7 +202,7 @@ main (int argc, const char *argv[])
|
||||
size_t szRx;
|
||||
|
||||
nfc_target_t nt = {
|
||||
.ptt = PTT_MIFARE,
|
||||
.nmt = NMT_ISO14443A,
|
||||
.nti.nai.abtAtqa = { 0x04, 0x00 },
|
||||
.nti.nai.abtUid = { 0x08, 0xad, 0xbe, 0xaf },
|
||||
.nti.nai.btSak = 0x20,
|
||||
|
||||
Reference in New Issue
Block a user