nfc-poll: code clean up, add man page.

This commit is contained in:
Romuald Conty 2010-10-08 17:05:05 +00:00
parent 8ec4c57910
commit aeadaf536c
3 changed files with 30 additions and 10 deletions

View file

@ -85,6 +85,7 @@ dist_man_MANS = \
nfc-list.1 \ nfc-list.1 \
nfc-mfclassic.1 \ nfc-mfclassic.1 \
nfc-mfultralight.1 \ nfc-mfultralight.1 \
nfc-poll.1 \
nfc-relay.1 \ nfc-relay.1 \
pn53x-diagnose.1 \ pn53x-diagnose.1 \
pn53x-sam.1 pn53x-sam.1

28
examples/nfc-poll.1 Normal file
View file

@ -0,0 +1,28 @@
.TH NFC-POLL 1 "June 26, 2009"
.SH NAME
nfc-poll \- Poll for one NFC target
.SH SYNOPSIS
.B nfc-poll
.SH DESCRIPTION
.B nfc-poll
is a utility for polling any available target using ISO14443-A, FeliCa, Jewel
and ISO14443-B modulations.
This tool relies on a hardware polling feature of the PN532, it will display
available information retrived from the tag.
.SH BUGS
Please report any bugs on the
.B libnfc
forum at
.BR http://www.libnfc.org/community/ "."
.SH LICENCE
.B libnfc
and
.B libnfc-examples
are covered by the GNU Lesser General Public License (LGPL), version 3.
.SH AUTHORS
Romuald Conty <romuald@libnfc.org>>
.PP
This manual page was written by Romuald Conty <romuald@libnfc.org>>.
It is licensed under the terms of the GNU GPL (version 2 or later).

View file

@ -97,15 +97,6 @@ main (int argc, const char *argv[])
nfc_perror (pnd, "nfc_configure"); nfc_perror (pnd, "nfc_configure");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
// Configure the CRC and Parity settings
if (!nfc_configure (pnd, NDO_HANDLE_CRC, true)) {
nfc_perror (pnd, "nfc_configure");
exit (EXIT_FAILURE);
}
if (!nfc_configure (pnd, NDO_HANDLE_PARITY, true)) {
nfc_perror (pnd, "nfc_configure");
exit (EXIT_FAILURE);
}
// Enable field so more power consuming cards can power themselves up // Enable field so more power consuming cards can power themselves up
if (!nfc_configure (pnd, NDO_ACTIVATE_FIELD, true)) { if (!nfc_configure (pnd, NDO_ACTIVATE_FIELD, true)) {
nfc_perror (pnd, "nfc_configure"); nfc_perror (pnd, "nfc_configure");
@ -114,7 +105,7 @@ main (int argc, const char *argv[])
printf ("Connected to NFC reader: %s\n", pnd->acName); printf ("Connected to NFC reader: %s\n", pnd->acName);
printf ("PN53x will poll during %ld ms\n", (unsigned long) btPollNr * szTargetTypes * btPeriod * 150); printf ("PN532 will poll during %ld ms\n", (unsigned long) btPollNr * szTargetTypes * btPeriod * 150);
res = nfc_initiator_poll_targets (pnd, nttArray, szTargetTypes, btPollNr, btPeriod, antTargets, &szTargetFound); res = nfc_initiator_poll_targets (pnd, nttArray, szTargetTypes, btPollNr, btPeriod, antTargets, &szTargetFound);
if (res) { if (res) {
uint8_t n; uint8_t n;