Attempt to provide clean types for API

This commit is contained in:
Romuald Conty 2010-10-13 17:43:23 +00:00
parent 9020014160
commit d289eabc36
19 changed files with 437 additions and 311 deletions

View file

@ -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,