From d186bfbaa3d540c92bd874420f618a85e16015e6 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Wed, 21 Jul 2010 11:41:58 +0000 Subject: [PATCH] Update after libnfc API change. --- libfreefare/freefare.c | 4 ++-- libfreefare/mifare_classic.c | 4 ++-- libfreefare/mifare_ultralight.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libfreefare/freefare.c b/libfreefare/freefare.c index 32aa1c6..38fa170 100644 --- a/libfreefare/freefare.c +++ b/libfreefare/freefare.c @@ -72,7 +72,7 @@ freefare_get_tags (nfc_device_t *device) if(!tags) return NULL; tags[0] = NULL; - while (nfc_initiator_select_tag(device,NM_ISO14443A_106,NULL,0,&target_info)) { + while (nfc_initiator_select_passive_target(device,NM_ISO14443A_106,NULL,0,&target_info)) { bool found = false; struct supported_tag *tag_info; @@ -124,7 +124,7 @@ freefare_get_tags (nfc_device_t *device) (tags[tag_count-1])->tag_info = tag_info; tags[tag_count] = NULL; - nfc_initiator_deselect_tag (device); + nfc_initiator_deselect_target (device); } return tags; diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index edfa877..a4c1db4 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -190,7 +190,7 @@ mifare_classic_connect (MifareTag tag) ASSERT_MIFARE_CLASSIC (tag); nfc_target_info_t pnti; - if (nfc_initiator_select_tag (tag->device, NM_ISO14443A_106, tag->info.abtUid, tag->info.szUidLen, &pnti)) { + if (nfc_initiator_select_passive_target (tag->device, NM_ISO14443A_106, tag->info.abtUid, tag->info.szUidLen, &pnti)) { tag->active = 1; } else { errno = EIO; @@ -208,7 +208,7 @@ mifare_classic_disconnect (MifareTag tag) ASSERT_ACTIVE (tag); ASSERT_MIFARE_CLASSIC (tag); - if (nfc_initiator_deselect_tag (tag->device)) { + if (nfc_initiator_deselect_target (tag->device)) { tag->active = 0; } else { errno = EIO; diff --git a/libfreefare/mifare_ultralight.c b/libfreefare/mifare_ultralight.c index e0ae324..4378862 100644 --- a/libfreefare/mifare_ultralight.c +++ b/libfreefare/mifare_ultralight.c @@ -84,7 +84,7 @@ mifare_ultralight_connect (MifareTag tag) ASSERT_MIFARE_ULTRALIGHT (tag); nfc_target_info_t pnti; - if (nfc_initiator_select_tag (tag->device, NM_ISO14443A_106, tag->info.abtUid, tag->info.szUidLen, &pnti)) { + if (nfc_initiator_select_passive_target (tag->device, NM_ISO14443A_106, tag->info.abtUid, tag->info.szUidLen, &pnti)) { tag->active = 1; for (int i = 0; i < MIFARE_ULTRALIGHT_PAGE_COUNT; i++) MIFARE_ULTRALIGHT(tag)->cached_pages[i] = 0; @@ -104,7 +104,7 @@ mifare_ultralight_disconnect (MifareTag tag) ASSERT_ACTIVE (tag); ASSERT_MIFARE_ULTRALIGHT (tag); - if (nfc_initiator_deselect_tag (tag->device)) { + if (nfc_initiator_deselect_target (tag->device)) { tag->active = 0; } else { errno = EIO;