Remove extra whitespaces/tabs before EOL.
find . -name '*.[ch]' | xargs perl -pi -e 's/\t+$//; s/ +$//' Thanks to Ludovic.
This commit is contained in:
parent
167238c60d
commit
26865bbc19
66 changed files with 483 additions and 483 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/**
|
||||
* @file quick_start_example1.c
|
||||
* @brief Quick start example that presents how to use libnfc
|
||||
*/
|
||||
|
|
@ -18,7 +18,7 @@ main (int argc, const char *argv[])
|
|||
{
|
||||
nfc_device *pnd;
|
||||
nfc_target nt;
|
||||
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
// Display libnfc version
|
||||
|
|
@ -35,7 +35,7 @@ main (int argc, const char *argv[])
|
|||
// Set opened NFC device to initiator mode
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf ("NFC reader: %s opened\n", nfc_device_get_name (pnd));
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,12 +22,12 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @file nfc-anticol.c
|
||||
* @brief Generates one ISO14443-A anti-collision process "by-hand"
|
||||
*/
|
||||
|
|
@ -150,7 +150,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ main (int argc, char *argv[])
|
|||
// Initialise NFC device as "initiator"
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Configure the CRC
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -70,7 +70,7 @@ main (int argc, const char *argv[])
|
|||
printf ("Usage: %s\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2011, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
* @file nfc-emulate-forum-tag2.c
|
||||
* @brief Emulates a NFC Forum Tag Type 2 with a NDEF message
|
||||
* This example allow to emulate an NFC Forum Tag Type 2 that contains a read-only NDEF message.
|
||||
*
|
||||
*
|
||||
* It have been developed using PN533 USB hardware as target and Google Nexus S phone as initiator.
|
||||
*
|
||||
* This is know to NOT work with Nokia 6212 Classic and could not work with
|
||||
|
|
@ -51,8 +51,8 @@
|
|||
* NFC Forum Type 2 Tag Operation
|
||||
* Technical Specification
|
||||
* NFCForum-TS-Type-2-Tag_1.0 - 2007-07-09
|
||||
*
|
||||
* ISO/IEC 14443-3
|
||||
*
|
||||
* ISO/IEC 14443-3
|
||||
* First edition - 2001-02-01
|
||||
* Identification cards — Contactless integrated circuit(s) cards — Proximity cards
|
||||
* Part 3: Initialization and anticollision
|
||||
|
|
@ -86,7 +86,7 @@ stop_emulation (int sig)
|
|||
|
||||
static uint8_t __nfcforum_tag2_memory_area[] = {
|
||||
0x00, 0x00, 0x00, 0x00, // Block 0
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, // Block 2 (Static lock bytes: CC area and data area are read-only locked)
|
||||
0xE1, 0x10, 0x06, 0x0F, // Block 3 (CC - NFC-Forum Tag Type 2 version 1.0, Data area (from block 4 to the end) is 48 bytes, Read-only mode)
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ main(int argc, char *argv[])
|
|||
};
|
||||
|
||||
signal (SIGINT, stop_emulation);
|
||||
nfc_init (NULL);
|
||||
nfc_init (NULL);
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -66,13 +66,13 @@ intr_hdlr (int sig)
|
|||
(void) sig;
|
||||
printf ("\nQuitting...\n");
|
||||
if (pnd != NULL) {
|
||||
nfc_close(pnd);
|
||||
nfc_close(pnd);
|
||||
}
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static bool
|
||||
static bool
|
||||
target_io( nfc_target *pnt, const uint8_t *pbtInput, const size_t szInput, uint8_t *pbtOutput, size_t *pszOutput )
|
||||
{
|
||||
bool loop = true;
|
||||
|
|
@ -182,7 +182,7 @@ main (int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
/**
|
||||
* @file nfc-emulate-uid.c
|
||||
* @brief Emulates a tag which which have a "really" custom UID
|
||||
*
|
||||
*
|
||||
* NFC devices are able to emulate passive tags but manufacturers restrict the
|
||||
* customization of UID. With PN53x, UID is only 4-byte long and the first
|
||||
* byte of emulated UID is hard-wired to 0x08 which is the standard way to say
|
||||
|
|
@ -127,7 +127,7 @@ main (int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC device
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
* Copyright (C) 2011, Adam Laurie
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,12 +23,12 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @file nfc-mfsetuid.c
|
||||
* @brief Set UID of special Mifare cards
|
||||
*/
|
||||
|
|
@ -178,7 +178,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ main (int argc, char *argv[])
|
|||
// Initialise NFC device as "initiator"
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Configure the CRC
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
* Copyright (C) 2011, Romain Tartiere, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -102,7 +102,7 @@ main (int argc, const char *argv[])
|
|||
|
||||
nfc_target nt;
|
||||
int res = 0;
|
||||
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
|
@ -114,7 +114,7 @@ main (int argc, const char *argv[])
|
|||
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf ("NFC reader: %s opened\n", nfc_device_get_name (pnd));
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -116,9 +116,9 @@ main (int argc, char *argv[])
|
|||
ERR ("%zd device found but two opened devices are needed to relay NFC.", szFound);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC emulator device
|
||||
pndTag = nfc_open (NULL, connstrings[0]);
|
||||
if (pndTag == NULL) {
|
||||
|
|
@ -168,10 +168,10 @@ main (int argc, char *argv[])
|
|||
|
||||
printf ("NFC reader device: %s opened", nfc_device_get_name (pndReader));
|
||||
printf ("%s", "Configuring NFC reader settings...");
|
||||
|
||||
|
||||
if (nfc_initiator_init (pndReader) < 0) {
|
||||
nfc_perror (pndReader, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if ((nfc_device_set_property_bool (pndReader, NP_HANDLE_CRC, false) < 0) ||
|
||||
(nfc_device_set_property_bool (pndReader, NP_HANDLE_PARITY, false) < 0) ||
|
||||
|
|
@ -220,7 +220,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
nfc_close (pndTag);
|
||||
nfc_close (pndTag);
|
||||
nfc_close (pndReader);
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,12 +22,12 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @file pn53x-diagnose.c
|
||||
* @brief Small application to diagnose PN53x using dedicated commands
|
||||
*/
|
||||
|
|
@ -67,9 +67,9 @@ main (int argc, const char *argv[])
|
|||
if (argc > 1) {
|
||||
errx (1, "usage: %s", argv[0]);
|
||||
}
|
||||
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version ();
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010, Emanuele Bertoldi
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -74,11 +74,11 @@ main (int argc, const char *argv[])
|
|||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
|
||||
int ret = EXIT_FAILURE;
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library examples
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2010, Romuald Conty
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2 )Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Note that this license only applies on the examples, NFC library itself is under LGPL
|
||||
*
|
||||
*/
|
||||
|
|
@ -84,7 +84,7 @@ int main(int argc, const char* argv[])
|
|||
}
|
||||
|
||||
nfc_init (NULL);
|
||||
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open(NULL, NULL);
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ int main(int argc, const char* argv[])
|
|||
printf ("NFC reader: %s opened\n", nfc_device_get_name (pnd));
|
||||
if (nfc_initiator_init (pnd) < 0) {
|
||||
nfc_perror (pnd, "nfc_initiator_init");
|
||||
exit (EXIT_FAILURE);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
char *cmd;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue