Commit Graph
1636 Commits
Author SHA1 Message Date
Romuald Conty 13e1e054c2 Minor code fix. 2012-05-30 23:02:48 +00:00
Romuald Conty d7e7979580 Listing passive targets now quit earlier if szTargets count is reached and in that case, leave with the latest tag selected.
That's quite useful when you need to directly use 1 target because in contrast of nfc_initiator_select_passive_target, you don't need to prepare initiator data by hands
2012-05-30 23:02:41 +00:00
Romuald Conty b5c634cb07 drivers/pn53x_usb: use default timeout command instead of infinite 2012-05-30 23:02:34 +00:00
Ludovic Rousseau 4a52c2ccd1 Add URL for "Vim: How to prevent trailing whitespaces" 2012-05-29 16:02:58 +00:00
Philippe Teuwen 723e2860ae Adding make style 2012-05-29 15:56:02 +00:00
Philippe Teuwen 568317929d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header --align-pointer=name 2012-05-29 15:55:35 +00:00
Philippe Teuwen 01303fab0d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header 2012-05-29 15:54:36 +00:00
Philippe Teuwen 562205cc14 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper 2012-05-29 15:54:00 +00:00
Philippe Teuwen 67522bae65 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux 2012-05-29 15:53:43 +00:00
Philippe Teuwen a2cd236441 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 2012-05-29 15:52:51 +00:00
Philippe Teuwen 26569c2202 Indent manually some comments to prepare astyle 2012-05-29 15:52:29 +00:00
Philippe Teuwen 7da28b87d2 HACKING: document EOL cleaning, thanks Ludovic 2012-05-29 07:59:04 +00:00
Romuald Conty 26865bbc19 Remove extra whitespaces/tabs before EOL.
find . -name '*.[ch]' | xargs perl -pi -e 's/\t+$//; s/ +$//'

Thanks to Ludovic.
2012-05-29 00:33:22 +00:00
Romuald Conty 167238c60d Fix uninitialized variable szTargetsData 2012-05-27 23:25:52 +00:00
Romuald Conty 8f08431ddf New function nfc_initiator_target_is_present() to test is a previously selected target is in the field. 2012-05-27 22:34:21 +00:00
Romuald Conty 2c9275adde nfc_initiator_transceive_bytes() now take a constant size for Rx buffer to have a cleaner API: no more in/out parameters 2012-05-27 21:06:22 +00:00
Ludovic Rousseau f0e85c027a ./configure shall be re-run to take any CFLAGS changes 2012-05-24 13:33:54 +00:00
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