Commit graph

1419 commits

Author SHA1 Message Date
Philippe Teuwen
dd12a4dd87 drivers/acr122_pcsc: allow LIBNFC_DEFAULT_DEVICE=acr122_pcsc:N where N is the Nth device accepted by the driver 2012-05-22 23:49:32 +00:00
Philippe Teuwen
912e32ecab Adding HACKING file, draft to be continued 2012-05-22 20:20:53 +00:00
Philippe Teuwen
47e90ee510 drivers/acr122_pcsc: allow LIBNFC_DEFAULT_DEVICE=acr122_pcsc 2012-05-22 17:25:48 +00:00
Ludovic Rousseau
56e44670a5 Log the device name if the open fails 2012-05-22 09:50:12 +00:00
Ludovic Rousseau
b237213f75 Log an error message if opening a device fails 2012-05-22 09:48:43 +00:00
Ludovic Rousseau
5a529ce30d Fix Debian lintian warning
W: libnfc2: package-name-doesnt-match-sonames libnfc3
2012-05-21 14:38:37 +00:00
Ludovic Rousseau
b41c063d4a Fix Debian lintian warning
P: libnfc source: unversioned-copyright-format-uri http://dep.debian.net/deps/dep5
N: 
N:    Format URI of the machine-readable copyright file is not versioned.
N:    
N:    Please use
N:    http://www.debian.org/doc/packaging-manuals/copyright-format/<version>/
N:    as the format URI instead.
2012-05-21 14:33:32 +00:00
Ludovic Rousseau
9deb6a7c6e Fix Debian lintian warning
W: libnfc source: brace-expansion-in-debhelper-config-file debian/libnfc-dev.install
N: 
N:    This debhelper config file appears to use shell brace expansion (such as
N:    {foo,bar}) to specify files. This happens to work due to an accident of
N:    implementation but is not a supported feature. Only ?, *, and [...] are
N:    supported.
2012-05-21 14:12:27 +00:00
Ludovic Rousseau
476eab10a1 Fix Debian lintian warning
I: libnfc source: binary-control-field-duplicates-source field "section" in package libnfc2
2012-05-21 14:10:16 +00:00
Romuald Conty
531702a1fc example/pn532-sam: Fix few bugs in SAM example
- Fix choice input (Dual card mode was not available);
 - Fix segfault when target selection returns no target;
 - Use error label to close the device before exiting;
2012-05-20 23:09:21 +00:00
Philippe Teuwen
ff87cf62b1 Fix segfault in pn53x_initiator_transceive_bytes when pszRx in NULL
Cause was "return *pszRx"
Segfault occured when listing a typeB'
2012-05-18 21:54:55 +00:00
Philippe Teuwen
969102c1a0 utils/nfc-list: always display the card type when a card is found 2012-05-18 21:54:45 +00:00
Ludovic Rousseau
4e5c60411f warning: 'libnfc.la': linking libtool libraries using a non-POSIX
archiver requires 'AM_PROG_AR' in 'configure.ac'
2012-05-18 07:42:25 +00:00
Ludovic Rousseau
beab815ecb warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') 2012-05-18 07:40:41 +00:00
Ludovic Rousseau
48016fa297 warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') 2012-05-18 07:38:42 +00:00
Ludovic Rousseau
db2173efdf configure.ac:84: warning: The macro `AC_HELP_STRING' is obsolete.
The new name is AS_HELP_STRING (available since Autoconf 2.58)
2012-05-18 07:33:30 +00:00
Ludovic Rousseau
6d45c804bb Updated by autoupdate 2.69 2012-05-18 07:30:39 +00:00
Philippe Teuwen
4bfd6ac874 fix disruptancies between tools location in src (utils<>examples) and in Debian packages (libnfc-bin<>libnfc-examples) 2012-05-17 19:22:25 +00:00
Ludovic Rousseau
2c5bac191f Remove useless pointer cast 2012-05-17 07:17:10 +00:00
Ludovic Rousseau
551512ad54 Do not cast pointers to different size integers
It will work only on little endian machines.

Fix clang warning
pn53x-tamashell.c:163:40: warning: cast from 'uint8_t *' (aka 'unsigned char *')
      to 'unsigned int *' increases required alignment from 1 to 4
      [-Wcast-align]
      size = sscanf(cmd+offset, "%2x", (unsigned int*)&byte);
                                       ^~~~~~~~~~~~~~~~~~~~
2012-05-17 07:16:02 +00:00
Romuald Conty
cfd95bae2c Fix shadowed declaration warnings 2012-05-17 01:18:24 +00:00
Romuald Conty
e4802de965 Add new public functions to grab information in string format:
- New nfc_device_get_information_about()
 - Moved nfc-utils function str_nfc_baud_rate()
 - New str_nfc_modulation_type()
 - Add new device_get_information_about callback to nfc_driver struct
 - Export new symbols
 - Changed internal pn53x firmware text handling: we now store firmware text for further operations
 - print_nfc_target() now uses str_nfc_* functions
 - nfc-probe util now have a verbose which display information on detected devices (Fix verbose set but not used warning ;-) )
2012-05-17 00:48:47 +00:00
Romuald Conty
6710ca943e Fix ACR122S device detection when no ACR122S device available (endless UART receive) 2012-05-17 00:38:54 +00:00
Romuald Conty
fb50e3b235 Display right driver name while detecting PCSC 2012-05-17 00:37:00 +00:00
Ludovic Rousseau
d98b5d00ab Fix the fix in revision r1322
clang warning:
arygon.c:115:118: warning: data argument not used by format string
      [-Wformat-extra-args]
  ..."%s", "Trying to find ARYGON device on serial port: %s at %d bauds.", acPort,...
     ~~~~                                                                  ^
1 warning generated.
2012-05-16 19:13:16 +00:00
Ludovic Rousseau
cf56496ee9 Fix compiler warning
pn53x-sam.c:120: warning: enumeration value ‘PSM_NORMAL’ not handled in
switch
2012-05-16 19:06:42 +00:00
Romuald Conty
45ef3b43c4 Fix unused result warnings and add a new NFC_ESOFT error. 2012-05-16 18:24:16 +00:00
Romuald Conty
bfcdb1bd4c Fix more warnings while using -Wswitch-enum and -Wshadow on internal libnfc files 2012-05-16 18:08:42 +00:00
Romuald Conty
d6a1249469 current debian package can compile all drivers except acr122_pcsc (PCSC dependencies have already been removed from package) 2012-05-16 18:06:27 +00:00
Romuald Conty
9ea7a9ea27 delete unused log4crc file 2012-05-16 18:02:51 +00:00
Romuald Conty
05acb85372 Use explicit case instead of default in switch()
- Fix warnings while using -Wswitch-enum
 - Fix two minor bugs due to a bad case handle
2012-05-16 17:51:34 +00:00
Romuald Conty
10f24d97aa Any successfull PowerDown command have to change local power mode state 2012-05-16 16:48:06 +00:00
Ludovic Rousseau
782b72e29f Correctly handle PCSC header files on Mac OS X
Fixes Issue #195
2012-05-16 13:34:21 +00:00
Ludovic Rousseau
3737481262 Correctly use the log_put() format
Fix compiler warning:
warning: format not a string literal and no format arguments
2012-05-16 13:17:52 +00:00
Ludovic Rousseau
eb1e6d0cb4 Check log_put() printf-like format
Thanks to Romain Tartière for the patch
http://groups.google.com/group/libnfc-devel/browse_thread/thread/da352d67e6965851
2012-05-16 13:15:34 +00:00
Ludovic Rousseau
d28889c696 Remove now useless #define for getline()
getline() is no more used. So no need to use this ugly hack.

This also solves a compiler warning;
In file included from ../libnfc/log.h:22:0,
                 from ../libnfc/chips/pn53x-internal.h:28,
                 from ../libnfc/chips/pn53x.h:31,
                 from pn53x-tamashell.c:68:
../config.h:153:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:165:0: note: this is the location of the previous definition
2012-05-15 07:57:37 +00:00
Romuald Conty
7b82a98b72 Improve acr122_usb frame building and add links to documentations 2012-05-15 07:27:28 +00:00
Philippe Teuwen
028db71d79 utils/nfc-emulate-forum-tag4: add support for v2.0 of the spec 2012-05-14 22:13:19 +00:00
Romuald Conty
a56e5f9cd7 Fix nfc-emulation, now works with utils/nfc-emulate-forum-tag4 and Nexus S 2012-05-14 21:20:26 +00:00
Romuald Conty
9383fa66bf Fix emulation based on nfc-emulation.c 2012-05-14 20:47:41 +00:00
Romuald Conty
769fc63bb0 Fix acr122_pcsc driver name. 2012-05-14 20:40:19 +00:00
Philippe Teuwen
7597055f26 fix typos 2012-05-14 19:44:03 +00:00
Romain Tartiere
e9b2f5729c Fix a bunch of warnings. 2012-05-14 13:47:31 +00:00
Romain Tartiere
2256d5d3dc Fix usage of possibly uninitialized 'result'.
Can't tell how gcc/clang fail to detect this…
2012-05-14 12:50:04 +00:00
Ludovic Rousseau
dfcabf71f0 Fix compiler warning
uart_posix.c:55:1: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
2012-05-14 09:23:18 +00:00
Ludovic Rousseau
1ac1196af6 MIN/MAX are already defined in nfc-utils.h and nfc-internal.h 2012-05-13 19:16:52 +00:00
Ludovic Rousseau
59d47bc7da Add MIN/MAX declarations in nfc-internal.h and nfc-utils.h
Remove the now useless #include <sys/param.h>
2012-05-13 19:15:44 +00:00
Ludovic Rousseau
a14ec0cbaa Fix compiler warnings:
In file included from nfc-internal.c:26:
nfc-internal.h:111:5: warning: "_BYTE_ORDER" is not defined
nfc-internal.h:111:20: warning: "_LITTLE_ENDIAN" is not defined
2012-05-13 15:11:28 +00:00
Ludovic Rousseau
b9e5e96e49 Use "const char *" instead of "char *" for the strings passed to
log_put()

It does not solve any bug but will allow to detect some by the compiler
2012-05-13 14:58:44 +00:00
Ludovic Rousseau
3e678822ce Fix compiler warnings
pn532_uart.c:151: warning: no previous prototype for ‘pn532_connstring_decode’
pn532_uart.c:491: warning: no previous prototype for ‘pn532_uart_abort_command’
2012-05-13 14:51:18 +00:00