Update after libnfc API change.

This commit is contained in:
Romain Tartiere 2010-07-21 11:41:58 +00:00
parent cae581eded
commit d186bfbaa3
3 changed files with 6 additions and 6 deletions

View file

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

View file

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

View file

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