Philippe Teuwen
24e1edd858
make style
2013-02-21 22:39:39 +01:00
Philippe Teuwen
5ced93fcbf
Makefile.am: move header files from noinst_HEADERS to _SOURCES
...
Ensures proper recompilation when a header file is edited.
cf https://www.gnu.org/software/automake/manual/html_node/Headers.html
2013-02-21 22:37:20 +01:00
Philippe Teuwen
9935095a36
Fix stack smash bug in LOG_HEX() macro
...
Fixes issue 232
2013-02-21 22:31:19 +01:00
Romuald Conty
7e26869b68
Fixes nfc_drivers memory leak
2013-02-21 19:58:40 +01:00
Romuald Conty
1e16795341
'make style' and align some #preprocessor directives
2013-02-19 00:43:20 +01:00
Philippe Teuwen
09ce0e822c
nfc_free(): fix related doc
2013-02-16 22:18:00 +01:00
Romuald Conty
f8601886fd
Adds nfc_free() function to freed allocated buffers
...
Fixes issue 228 (Thanks to Alex Lian)
2013-02-16 14:20:37 +01:00
Romuald Conty
360365ca84
Preserves error code while setting parameters
...
It now returns a more precise error code while using pn53x_set_property_bool() with NP_AUTO_ISO14443_4 flag.
2013-02-15 09:38:26 +01:00
Alex Lian
4487fd768e
Windows: Shift files from libnfc/windows to libnfc/contrib/win32
...
- Fixes the fact files were missed in package
2013-02-14 15:33:47 +01:00
Philippe Teuwen
73992041b4
Merge remote-tracking branch 'ahti/issue-137' into master
...
* ahti/issue-137:
Add nfc_register_driver.
Fixes issue 225
Helps issue 137
2013-02-06 15:07:18 +01:00
Romuald Conty
d5b6a7c4d1
Resolves conflict between Alex Lian and master branch
2013-02-04 10:14:34 +01:00
Alex Lian
54e0bdb62f
Windows: Build updates
...
- Generate rc files from version.rc.in + CMake variable information in CMakeLists files
- Add step to generate .lib file for windows developers
- Re-structure tool flag usage, apparently ADD_DEFINTIONS adds them to _ALL_ tools. This is bad for rc files with the windres tool.
Needs other platform testing, as the flags have changed to fix Windows rc file generation.
2013-02-01 10:19:02 -05:00
lego
225094e2c8
Add nfc_register_driver. Issue 137.
...
The nfc_register_driver allows users of the library to write their
own device drivers without needing to resort to hacking libnfc itself.
2013-02-01 14:40:40 +02:00
Romuald Conty
8127a2ca63
Merge branch 'master' of https://code.google.com/p/libnfc
2013-02-01 11:46:26 +01:00
Romuald Conty
b5f8ce91c7
Uses configurable path for libnfc's configuration files
2013-02-01 11:11:39 +01:00
Romuald Conty
cf9e02879a
Enables logging by default when using CMake
2013-02-01 10:32:44 +01:00
Philippe Teuwen
06bfed11b9
Various typos
2013-01-31 21:58:29 +01:00
Romuald Conty
519dd8f8e2
make style
2013-01-31 16:12:14 +01:00
Romuald Conty
acdde1088c
Renames contrib/win32/nfc_win32.c to contrib/win32/stdlib.c
2013-01-31 16:09:41 +01:00
Alex Lian
ef33827f04
Fix setenv/unsetenv link errors by implementing a local version using Windows SetEnvironmentVariable.
...
Untested, and does not comply with the error returns per setenv.
2013-01-31 15:52:39 +01:00
Alex Lian
9f682cc52b
Fix enabling of LIBNFC_DEBUG_OUTPUT
...
- inclusion of log-printf.c didn't align with needed preprocessor definitions
- Added extra #error as well as preprocessor protection
- fixed CMakeList to specify -DLOG as appropriate per the header log.h usage
2013-01-31 15:52:39 +01:00
Alex Lian
eb90c5a8db
Add CMake options for Win32 to require PCRE
2013-01-31 15:52:39 +01:00
Philippe Teuwen
8bc7a1c291
call idle() from driver-dependent close() rather than from nfc_close() as some driver still need to do an ack() before
2013-01-31 01:18:23 +01:00
Philippe Teuwen
683505f39b
pn53x_idle: call driver-dependent PowerDown & do InRelease first, skip redundant InDeselect
2013-01-31 01:16:37 +01:00
Philippe Teuwen
1682a86166
Add driver-dependent PowerDown
2013-01-31 01:15:03 +01:00
Philippe Teuwen
db8033622a
acr122_pcsc: fix log category
2013-01-31 01:08:23 +01:00
Philippe Teuwen
5446242094
acr122_usb: remove pn53x_idle support. Fixes issue #217
2013-01-30 01:27:18 +01:00
Romuald Conty
98948172b4
Fixes pn53x_usb timeout while bulk write.
...
Thanks to Tredger for reporting.
Fixes issue 223.
2013-01-30 00:57:06 +01:00
Romuald Conty
cd2b03a08a
Add timeout parameter to nfc_emulate_target() function.
...
Fixes issue 219.
Thanks to raidolinja.
2013-01-30 00:10:24 +01:00
Romuald Conty
4b97700352
Removes exit() calls
...
Fixes issue 220
exit() was used to run abort-driven development while API changed, I forgot to remove them, sorry for that :-)
2013-01-28 13:57:40 +01:00
Ludovic Rousseau
2faa532826
Fix a typo detected by lintian(1)
...
unkown -> unknown
2013-01-25 14:41:33 +01:00
Philippe Teuwen
5876e33e49
Fix returned value ((res=f()<0)) => ((res=f())<0); this solves a bug in nfc-relay-picc
2013-01-22 00:56:34 +01:00
Philippe Teuwen
edacadbce6
make style
2013-01-20 15:48:32 +01:00
Philippe Teuwen
532b30a2cd
Merge branch 'test_user_defined_device_optional'
...
* test_user_defined_device_optional:
Fix double malloc
Allow device.optional=true to tolerate missing device
2013-01-20 15:36:29 +01:00
Philippe Teuwen
bcd53a7cdc
Fix double malloc
2013-01-20 15:24:03 +01:00
Philippe Teuwen
4576bad369
Fix ISO14443B' ATS broken by updated API
2013-01-19 00:14:19 +01:00
Philippe Teuwen
04a7d2a3ba
Allow device.optional=true to tolerate missing device
2013-01-18 22:54:44 +01:00
Romuald Conty
2d53208082
Fix unit tests
...
This commit bring tests to life!
New issue
Summary: test_dep_states test fails
When first device is idle, the second one states "RF Transmission Error" instead of simply not found any available device.
Full cutter log here:
debug libnfc.chip.pn53x InJumpForDEP
debug libnfc.chip.pn53x Timeout values: 300
debug libnfc.bus.uart TX: 00 00 ff 05 fb d4 56 00 00 00 d6 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart Timeout!
debug libnfc.chip.pn53x InJumpForDEP
debug libnfc.chip.pn53x Timeout values: 300
debug libnfc.bus.uart TX: 00 00 ff 05 fb d4 56 00 00 00 d6 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 03 fd
debug libnfc.bus.uart RX: d5 57
debug libnfc.bus.uart RX: 01
debug libnfc.bus.uart RX: d3 00
debug libnfc.chip.pn53x Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
F
===============================================================================
Failure: test_dep_states
Problem with nfc_idle
<0 == res>
expected: <0>
actual: <-20>
diff:
? -20
./test_device_modes_as_dep.c:171: initiator_thread(): cut_assert_equal_int(0, res, cut_test_context_set_current_result_user_message( cut_test_context_current_peek(), cut_test_context_take_printf(cut_test_context_current_peek(), "Problem with nfc_idle")))
===============================================================================
2013-01-18 18:28:45 +01:00
Romuald Conty
443f70dd65
Fix wrong condition to display a warning when user disables autoscan
2013-01-18 18:14:59 +01:00
Romuald Conty
f2be582cd5
Fix timeout documentation
2013-01-15 14:22:21 +01:00
Romuald Conty
945e1d140d
Bump API version
2013-01-15 13:45:48 +01:00
Romuald Conty
82c41b4fc1
Fixes style: make style
2012-12-09 20:09:55 +01:00
Romuald Conty
8d9d6a5696
Add ttyAMA* to radix list from UART scanning
...
It allows a PN532 UART connected on raspberry pi to be detected when intrusive scan allowed (e.g. with nfc-scan-device -i)
2012-12-09 19:10:35 +01:00
Romuald Conty
0af58b1cdd
Attempt to build libnfc under for Windows target.
...
This commit fixes some issues related to the new log system, but libnfc can not build on Windows in this stage since regex.h have been introduced for configuration file parsing and regex.h is not available in Windows.
New issue
Summary: Update Windows port
Due to the recent configuration file parsing introduction, libnfc can not be built under Windows: regex.h is missing.
Google says there is a port of PCRE for Windows which contains a compiliant regex.h.
Contribution are welcome as nobody from currently active team use Windows as OS.
2012-12-05 18:22:27 +01:00
Romuald Conty
8f015c4369
Suppress warnings: "ISO C99 requires rest arguments to be used"
2012-12-05 16:53:43 +01:00
Romuald Conty
08f428fbdf
Fix CMake build.
2012-12-05 16:47:08 +01:00
Romuald Conty
53349c8c20
Prevent from segfault if user add too many devices in configuration file(s)
2012-12-05 16:41:44 +01:00
Romuald Conty
a3a3fa2848
Enhance messages display
2012-12-05 16:40:52 +01:00
Romuald Conty
dc949c257e
Removes nfc_get_default_device() function.
...
The nfc_get_default_device() is not needed anymore since the first element from returned nfc_connstring list of nfc_list_devices() function.
Plus, nfc_open() can be use with NULL nfc_connstring which will select automatically the first available device (ie. the default one).
2012-12-05 00:51:13 +01:00
Romuald Conty
03e5611d14
New feature: search in a directory for devices configuration files.
2012-12-05 00:51:13 +01:00