From 5fdb7ab2548cecd58363dd0562b7478d580f86e6 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Wed, 6 Oct 2010 09:10:14 +0000 Subject: [PATCH] examples: rename nfc-sam to pn53x-sam, it need to made some direct calls to pn53x_* functions. --- examples/Makefile.am | 12 ++++++------ examples/{nfc-sam.1 => pn53x-sam.1} | 10 +++++----- examples/{nfc-sam.c => pn53x-sam.c} | 4 +--- 3 files changed, 12 insertions(+), 14 deletions(-) rename examples/{nfc-sam.1 => pn53x-sam.1} (79%) rename examples/{nfc-sam.c => pn53x-sam.c} (97%) diff --git a/examples/Makefile.am b/examples/Makefile.am index 6c920e4..c330ca1 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -8,10 +8,10 @@ bin_PROGRAMS = \ nfc-mfultralight \ nfc-poll \ nfc-relay \ - nfc-sam \ nfcip-initiator \ nfcip-target \ pn53x-diagnose \ + pn53x-sam \ pn53x-tamashell # set the include path found by configure @@ -58,10 +58,6 @@ nfc_emulate_tag_SOURCES = nfc-emulate-tag.c nfc_emulate_tag_LDADD = $(top_builddir)/libnfc/libnfc.la \ libnfcutils.la -nfc_sam_SOURCES = nfc-sam.c -nfc_sam_LDADD = $(top_builddir)/libnfc/libnfc.la \ - libnfcutils.la - nfcip_target_SOURCES = nfcip-target.c nfcip_target_LDADD = $(top_builddir)/libnfc/libnfc.la @@ -72,11 +68,15 @@ pn53x_diagnose_SOURCES = pn53x-diagnose.c pn53x_diagnose_LDADD = $(top_builddir)/libnfc/libnfc.la \ libnfcutils.la +pn53x_sam_SOURCES = pn53x-sam.c +pn53x_sam_LDADD = $(top_builddir)/libnfc/libnfc.la \ + libnfcutils.la + pn53x_tamashell_SOURCES = pn53x-tamashell.c pn53x_tamashell_LDADD = $(top_builddir)/libnfc/libnfc.la \ libnfcutils.la pn53x_tamashell_LDFLAGS = @READLINE_LIBS@ -dist_man_MANS = nfc-anticol.1 nfc-emulate.1 nfc-list.1 nfc-mfclassic.1 nfc-mfultralight.1 nfc-relay.1 nfc-sam.1 +dist_man_MANS = nfc-anticol.1 nfc-emulate.1 nfc-list.1 nfc-mfclassic.1 nfc-mfultralight.1 nfc-relay.1 pn53x-sam.1 EXTRA_DIST = CMakeLists.txt diff --git a/examples/nfc-sam.1 b/examples/pn53x-sam.1 similarity index 79% rename from examples/nfc-sam.1 rename to examples/pn53x-sam.1 index 01b32a6..a03ef59 100644 --- a/examples/nfc-sam.1 +++ b/examples/pn53x-sam.1 @@ -1,13 +1,13 @@ -.TH NFC-SAM 1 "June 15, 2010" +.TH PN53X-SAM 1 "June 15, 2010" .SH NAME -nfc-sam \- NFC SAM comunication command line tool based on libnfc +pn53x-sam \- PN53x SAM comunication demonstration tool .SH SYNOPSIS -.B nfc-sam +.B pn53x-sam .SH DESCRIPTION -.B nfc-sam +.B pn53x-sam utility attempts to test a simple connection with a SAM (Secure Access Module) in several modes. -To run this utility you must have a SAM (like the NXP's P5CN072 chip) successfully connected to your NFC chip. +To run this utility you must have a SAM (like the NXP's P5CN072 chip) successfully connected to your PN53x chip. .SH BUGS Please report any bugs on the diff --git a/examples/nfc-sam.c b/examples/pn53x-sam.c similarity index 97% rename from examples/nfc-sam.c rename to examples/pn53x-sam.c index 6133208..1b6b529c 100644 --- a/examples/nfc-sam.c +++ b/examples/pn53x-sam.c @@ -18,7 +18,7 @@ */ /** - * @file nfc-sam.c + * @file pn53x-sam.c * @brief Configure the NFC device to comunicate with a SAM (Secure Access Module). */ @@ -46,7 +46,6 @@ #include #include "nfc-utils.h" -// FIXME Avoid usage of pn53x specific function or change the name from nfc-sam to pn53x-sam #include "chips/pn53x.h" #define MAX_FRAME_LEN 264 @@ -83,7 +82,6 @@ sam_connection (nfc_device_t * pnd, int mode) break; } - // FIXME Avoid direct call to pn53x functions if (!pn53x_transceive (pnd, pncmd_sam_config, szCmd, abtRx, &szRxLen)) { nfc_perror(pnd, "pn53x_transceive"); ERR ("%s %d", "Unable to execute SAMConfiguration command with mode byte:", mode);