Commit Graph
100 Commits
Author SHA1 Message Date
Philippe Teuwen cc7c0c32f1 Fix warning about incompatible types
pn53x.c:85:57: warning: Result of 'malloc' is converted to a pointer of type 'nfc_modulation_type', which is incompatible with sizeof operand type 'nfc_modulation'
    CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9);
                                                        ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
2013-07-02 22:44:55 +02:00
Philippe Teuwen 03e1f23a40 Make use of new PN53x_ACK_FRAME__LEN 2013-06-15 23:14:54 +02:00
Philippe Teuwen 957bebfd48 make style 2013-06-15 22:51:53 +02:00
Philippe Teuwen 9de66d463b UART: add support for BeagleBone serial ports
Thanks to Johan Henselmans!
2013-06-15 22:01:28 +02:00
Philippe Teuwen d99bcb79fa I2C: add i2c support to CMake 2013-06-15 00:41:20 +02:00
Philippe Teuwen 5cc3f3551a I2C: add i2c to cppcheck 2013-06-15 00:37:08 +02:00
Philippe Teuwen 35da0c0b8a Update ChangeLog & NEWS 2013-06-15 00:35:18 +02:00
Philippe Teuwen 4c707e04ad I2C: add conf example 2013-06-15 00:25:08 +02:00
Philippe Teuwen 77445f1672 I2C: remove unneeded I2C_DRIVERS_ENABLED 2013-06-15 00:20:04 +02:00
Philippe Teuwen 3cd26a18f1 I2C: add Laurent Latil as author 2013-06-15 00:04:06 +02:00
Philippe Teuwen 238be3f068 make style 2013-06-15 00:01:25 +02:00
Philippe Teuwen 6038aca7d1 acr122_usb: remove ACR122<>TOUCHATAG model distinction 2013-06-14 23:58:55 +02:00
Philippe Teuwen c6bda74f44 acr122_usb: ACR122U does not need PCSC Escape anymore
ACR122U:
Through PCSC we couldn't send APDUs to the reader if there was no card
but now that we communicate directly with the reader, we can send APDUs
even if there is no card, so we don't need the Escape mechanism anymore
2013-06-14 23:39:43 +02:00
Philippe Teuwen c2fa73b404 acr122_usb: retry a few times if init failed 2013-06-14 23:28:03 +02:00
Philippe Teuwen f0471ebc89 acr122_usb: capture more specifically the expected error SW=637f 2013-06-13 21:01:08 +02:00
Philippe Teuwen 7638e9ea87 mifare_classic_block_manufacturer: clearer struct members
Fixes issue 250
2013-06-13 20:14:22 +02:00
Philippe Teuwen c97c70f5d5 Fix typo in libnfc.conf.sample
Fixes issue 247
2013-04-30 21:48:33 +02:00
Philippe Teuwen 41ec6d49f6 Add ISO14443-4 chaining support for RX (MI) 2013-04-28 23:52:15 +02:00
Philippe Teuwen 0841a94c65 nfc-mfclassic: allow option f for read operation too 2013-04-09 23:42:55 +02:00
Philippe Teuwen 29c7ef19a9 Debian: rc6 -> rc7 2013-04-05 16:18:12 +02:00
Philippe Teuwen b950eacfdf drivers USB: check usb_open() result
Fixes issue 245
2013-04-05 15:42:57 +02:00
Philippe Teuwen 9cb9e0e6da Fix cppcheck warning: The scope of the variable X can be reduced. 2013-04-05 14:38:03 +02:00
Philippe Teuwen fc144fe389 nfc-anticol: add option -t for timed exchanges 2013-04-05 14:33:16 +02:00
Philippe Teuwen d319e87ff8 HACKING: refer to make cppcheck 2013-04-05 11:43:47 +02:00
Philippe Teuwen a3475cc896 make cppcheck: add PN532_SPI 2013-04-05 11:42:57 +02:00
Philippe Teuwen 0625544cc3 Merge branch 'pn532_spi'
* pn532_spi:
  SPI: remove dead code
  SPI: add 1ms sleep in wakeup()
  SPI: update NEWS & Changelog
  Add connstring example for SPI on RPi
  Add PN532 SPI driver to CMake
  spi: fix doc typos
  spi: remove spi_posix.c, exotic platform implementations will have to be done in their respective contrib subdir
  Only include SPI related files when (at least) one SPI driver is enabled
  pn532_spi: missing malloc() checks, spi_close(), nfc_device_close() on some error handling branches
  pn532_spi: fix missing free(ndd.port)
  pn532_spi: fix double free() of spi port info
  Add pn532_spi author to AUTHORS
  Unify copyright notices
  pn532_spi: use new connstring_decode()
  Fix cppcheck warning "Non reentrant function 'readdir' called"
  Fix cppcheck warning "scanf without field width limits can crash with huge input data"
  Fix cppcheck warning "Obsolete function 'usleep' called"
  spi driver: remove compilation warnings
  make style
  Adding a SPI driver for pn532
2013-04-01 13:24:28 +02:00
Philippe Teuwen 0b1bf105be Revert 1c67c3f92a
Fixes issue 244
errorlibnfc.driver.acr122_usbToo small reply
2013-03-30 17:51:06 +01:00
Philippe Teuwen 1b45bd4ee1 SPI: remove dead code 2013-03-28 00:20:03 +01:00
Philippe Teuwen f9bd5d79d2 SPI: add 1ms sleep in wakeup()
Without this delay I had troubles with a Raspberry-Pi:
With debug enabled I could go as high as 7.8MHz but without debug I had to go lower than 500kHz otherwise I got following error:
  errorlibnfc.driver.pn532_spiUnable to wait for SPI data. (RX)
  pn53x_check_communication: Timeout
It could work occassionally faster but very unreliable.
So the delay introduced by printf() was enough to "fix" the problem, therefore this little extra sleep() in wakeup().
2013-03-28 00:19:29 +01:00
Philippe Teuwen c8e50b6852 SPI: update NEWS & Changelog 2013-03-27 23:33:02 +01:00
Philippe Teuwen f991771128 Add connstring example for SPI on RPi 2013-03-27 23:29:59 +01:00
Philippe Teuwen 7c2f8b4cb0 Add PN532 SPI driver to CMake 2013-03-27 23:25:43 +01:00
Philippe Teuwen dcc527df7b Merge branch 'master' into pn532_spi
* master:
  CMake: enable same set of default drivers as for autotools
  pn532_uart: Unify copyright notices & update authors lists (somehow this file was forgotten)
2013-03-27 23:13:19 +01:00
Philippe Teuwen 3eb1ee3b9c CMake: enable same set of default drivers as for autotools 2013-03-27 23:12:59 +01:00
Philippe Teuwen 7df8fdd0f6 spi: fix doc typos 2013-03-27 22:58:59 +01:00
Philippe Teuwen 12b756e97a spi: remove spi_posix.c, exotic platform implementations will have to be done in their respective contrib subdir 2013-03-27 17:40:22 +01:00
Philippe Teuwen fc420d58af Only include SPI related files when (at least) one SPI driver is enabled 2013-03-27 16:58:01 +01:00
Philippe Teuwen 1ab282d43c pn532_spi: missing malloc() checks, spi_close(), nfc_device_close() on some error handling branches 2013-03-27 16:27:25 +01:00
Philippe Teuwen f1a9a8ee38 pn532_uart: Unify copyright notices & update authors lists (somehow this file was forgotten) 2013-03-27 16:12:18 +01:00
Philippe Teuwen 794fcdc1ad pn532_spi: fix missing free(ndd.port) 2013-03-27 12:06:37 +01:00
Philippe Teuwen 87a3dd7067 pn532_spi: fix double free() of spi port info 2013-03-27 12:06:33 +01:00
Philippe Teuwen 1417bdc164 Merge branch 'master' into pn532_spi
* master: (28 commits)
  Update Changelog
  Add missing windows files in archive
  Move log implementation for Windows in dedicated directory
  Move UART implementation for Windows in dedicated directory
  CMake: only compile usbbus.c when (at least) one USB driver is enabled
  CMake: only include UART related files when (at least) one UART driver is enabled
  Only include UART related files when (at least) one UART driver is enabled
  Fix environment vars usage when compiling with CMake
  Remove unsed code section in log.c (was commented)
  pn53x_current_target_new() now returns null ptr upon malloc() error
  fix missing tests on malloc() return
  pn53x_data_new() now returns null ptr upon malloc() error
  uart drivers: missing pn53x_data_free() on some error handling branches
  uart drivers: missing nfc_device_free() on some error handling branches
  uart drivers: missing uart_close() on some error handling branches
  uart drivers: fix missing free(ndd.port)
  config parser: missing fclose()
  UART drivers: fix double free() of serial port info
  Fix cmake build failure under linux
  quick_start_example1.c: avoid using warnx() to remove err.h dependency
  ...

Conflicts:
	libnfc/buses/Makefile.am
2013-03-27 11:44:29 +01:00
Philippe Teuwen eb515a6952 Update Changelog 2013-03-27 11:33:03 +01:00
Philippe Teuwen 890f028b0c pn53x_current_target_new() now returns null ptr upon malloc() error 2013-03-18 01:00:41 +01:00
Philippe Teuwen 69c435f348 fix missing tests on malloc() return 2013-03-18 00:46:31 +01:00
Philippe Teuwen 06d5b54308 pn53x_data_new() now returns null ptr upon malloc() error 2013-03-18 00:21:08 +01:00
Philippe Teuwen af57df532b uart drivers: missing pn53x_data_free() on some error handling branches 2013-03-18 00:21:03 +01:00
Philippe Teuwen 5f70bdc699 uart drivers: missing nfc_device_free() on some error handling branches 2013-03-17 23:52:54 +01:00
Philippe Teuwen 2e801a62d5 uart drivers: missing uart_close() on some error handling branches 2013-03-17 23:52:43 +01:00
Philippe Teuwen c1372a009f uart drivers: fix missing free(ndd.port) 2013-03-17 22:54:15 +01:00
Philippe Teuwen 77838b894c config parser: missing fclose() 2013-03-17 22:19:49 +01:00
Philippe Teuwen ca7477e935 UART drivers: fix double free() of serial port info
Fixes issue 242
2013-03-16 12:25:28 +01:00
Philippe Teuwen ecc12d28aa quick_start_example1.c: avoid using warnx() to remove err.h dependency
err.h is not available under Windows and the goal of this example is not to learn how to get around that problem ;)
2013-03-12 17:46:04 +01:00
Philippe Teuwen e70a3314bf Update ChangeLog & make style 2013-03-12 17:07:09 +01:00
Philippe Teuwen 20e51e9752 nfc-mfclassic: add option to allow using keyfile from another card 2013-03-12 15:39:57 +01:00
Philippe Teuwen 16161e1a68 nfc-mfclassic: detect 2K MFP via RATS 2013-03-12 14:15:04 +01:00
Philippe Teuwen d019f9729d nfc-anticol: fix ATS length 2013-03-12 12:23:15 +01:00
Philippe Teuwen 56ea2e65dc nfc-mfclassic: use smaller files for cards < 4k 2013-03-12 10:56:57 +01:00
Philippe Teuwen 94617366a7 nfc-mfclassic: abort if expected UID is not matching real card 2013-03-12 10:56:20 +01:00
Philippe Teuwen bb7b05681e nfc-mfclassic: fix reporting of processed blocks number 2013-03-12 10:55:45 +01:00
Philippe Teuwen a3f4145a2e Add pn532_spi author to AUTHORS 2013-03-10 16:33:53 +01:00
Philippe Teuwen dd209460b1 Update ChangeLog 2013-03-10 16:32:28 +01:00
Philippe Teuwen baa0f9ae36 Unify copyright notices 2013-03-10 16:18:22 +01:00
Philippe Teuwen d683a98065 Merge branch 'master' into pn532_spi
* master:
  Unify copyright notices & update authors lists
  Update ChangeLog
2013-03-10 16:17:59 +01:00
Philippe Teuwen bf164220ee Unify copyright notices & update authors lists 2013-03-10 16:15:23 +01:00
Philippe Teuwen a4a531068f Update ChangeLog 2013-03-10 00:32:05 +01:00
Philippe Teuwen ec99e9033a pn532_spi: use new connstring_decode()
Fix cppcheck warning "Non reentrant function 'strtok' called"
2013-03-10 00:29:01 +01:00
Philippe Teuwen 759cd106e5 Merge branch 'master' into pn532_spi
* master:
  New connstring_decode() fix cppcheck warning "Non reentrant function 'strtok' called"
  Update Changelog
  Update NEWS & Changelog
  Forgot to commit new log internal header file
  Remove log-printf from CMakefile
  Add log_internal.h to Makefile
  Creating log_internal.h for log_*put_internal() prototypes
  log_win32: declare log_output_debug() static
  Merge log-printf.c into log.c, inline with prototypes in log.h & platform files log_*.c
2013-03-10 00:22:27 +01:00
Philippe Teuwen cc03f84636 New connstring_decode() fix cppcheck warning "Non reentrant function 'strtok' called" 2013-03-10 00:20:52 +01:00
Philippe Teuwen 59271d27e9 Update Changelog 2013-03-09 16:33:51 +01:00
Philippe Teuwen e7f4d0778e Update NEWS & Changelog 2013-03-09 11:27:56 +01:00
Philippe Teuwen 38966cb2fb Forgot to commit new log internal header file 2013-03-09 10:56:51 +01:00
Philippe Teuwen ad8b338a7b Remove log-printf from CMakefile 2013-03-09 10:41:25 +01:00
Philippe Teuwen a9e3365d98 Add log_internal.h to Makefile 2013-03-09 10:41:07 +01:00
Philippe Teuwen 6a110b3849 Creating log_internal.h for log_*put_internal() prototypes
Fixed warning "no previous prototype for function" in log_posix.c
2013-03-09 01:00:21 +01:00
Philippe Teuwen 7e26aa368d log_win32: declare log_output_debug() static 2013-03-09 00:47:21 +01:00
Philippe Teuwen f19d233fad Merge log-printf.c into log.c, inline with prototypes in log.h & platform files log_*.c 2013-03-09 00:46:45 +01:00
Philippe Teuwen 262555d568 Fix cppcheck warning "Non reentrant function 'readdir' called" 2013-03-08 23:50:03 +01:00
Philippe Teuwen 8e2effdc53 Fix cppcheck warning "scanf without field width limits can crash with huge input data" 2013-03-08 23:43:41 +01:00
Philippe Teuwen ff11c8ac87 Fix cppcheck warning "Obsolete function 'usleep' called" 2013-03-08 23:30:21 +01:00
Philippe Teuwen 05b9cde966 Merge branch 'master' into pn532_spi
* master: (43 commits)
  Windows: workaround as libusb is not automatically detected by CMake
  Add usbbus to Makefile.am EXTRA_DIST
  make style
  Add log_posix to Makefile.am
  Split logging internals so that platforms may choose additional or alternate spew mechanisms
  More explicitely ignoring return value as suggested by Ludovic
  Windows: Clean up all compiler warnings and link warnings
  API change
  make style
  pn53x-sam: fix print_nfc_target
  Convert by value passing of nfc_target to pointer for str_nfc_target and nfc_initiator_target_is_present
  Windows: Fix bug when compiling without libusb: skip usbbus.c
  Windows: Fix compilation due to new usbbus file
  Fix bug when compiling without libusb: skip usbbus.c
  Fix scan-build warning: cast increases required alignment from 1 to 4
  Fix cppcheck warning "Obsolete function 'usleep' called"
  Avoid warning about ignoring return value of 'read'
  Fix cppcheck warning "Non reentrant function 'readdir' called"
  conf.h: make it more standard
  uart_posix.c: remove redundant include
  ...
2013-03-08 23:00:44 +01:00
Philippe Teuwen 3ac1d64b4f Windows: workaround as libusb is not automatically detected by CMake
Fixes issue 238
2013-03-08 08:15:40 +01:00
Philippe Teuwen 5704b668b7 Add usbbus to Makefile.am EXTRA_DIST 2013-03-08 00:35:36 +01:00
Philippe Teuwen fef6517e27 make style 2013-03-08 00:35:04 +01:00
Philippe Teuwen 37cf7554d9 Add log_posix to Makefile.am 2013-03-08 00:34:14 +01:00
Philippe Teuwen 563054d2a2 More explicitely ignoring return value as suggested by Ludovic 2013-03-07 10:34:17 +01:00
Philippe Teuwen bd961222a3 API change 2013-03-07 09:27:45 +01:00
Philippe Teuwen d8a93217ff make style 2013-03-07 09:17:27 +01:00
Philippe Teuwen 181cd914d5 pn53x-sam: fix print_nfc_target 2013-03-07 09:17:11 +01:00
Philippe Teuwen a262be5633 Windows: Fix bug when compiling without libusb: skip usbbus.c 2013-03-07 08:09:32 +01:00
Philippe Teuwen 008158090c Fix bug when compiling without libusb: skip usbbus.c 2013-03-07 00:43:35 +01:00
Philippe Teuwen 1c67c3f92a Fix scan-build warning: cast increases required alignment from 1 to 4
acr122_usb.c:562:20: warning: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
  uint32_t *pu32 = (uint32_t *)u8;
                   ^~~~~~~~~~~~~~
2013-03-06 23:22:02 +01:00
Philippe Teuwen 048ed88e16 Fix cppcheck warning "Obsolete function 'usleep' called"
It is recommended to use the 'nanosleep' or 'setitimer' function instead.
2013-03-06 21:43:36 +01:00
Philippe Teuwen fdd5bd3523 Avoid warning about ignoring return value of 'read' 2013-03-06 21:13:39 +01:00
Philippe Teuwen 7fb538737d Fix cppcheck warning "Non reentrant function 'readdir' called"
For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
2013-03-06 20:59:41 +01:00
Philippe Teuwen 90622f52b7 conf.h: make it more standard 2013-03-06 19:36:32 +01:00
Philippe Teuwen b81519c6a9 uart_posix.c: remove redundant include 2013-03-06 19:34:57 +01:00
Philippe Teuwen a0b859b2a1 Fix cppcheck warning "Non reentrant function 'readdir' called"
For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
2013-03-06 15:20:15 +01:00
Philippe Teuwen 4dafd70b64 Fix cppcheck warning "Statements following return will never be executed" 2013-03-06 12:42:39 +01:00
Philippe Teuwen 1d5f9956fb Fix cppcheck warning "buffer may not be null-terminated after call to strncpy()" 2013-03-06 12:38:59 +01:00