Audrey Diacre
145cc4b2ad
nfc_initiator_transceive_bytesfunction now returns libnfc error code on failure and received bytes count on success.
2011-12-19 14:37:22 +00:00
Audrey Diacre
31f67be83e
add some forgotten NFC_SUCCESS returns in pn53x_set_property_bool function and fix some return types in test/
2011-12-19 14:05:02 +00:00
Romuald Conty
bf7c36d9bb
less structs and defines publicly exposed
...
- nfc_device is now an opaque type;
- PN53x specific errors are not public anymore;
- nfc_device_name() renamed to nfc_device_get_name() for the sake of consistency;
- examples/*, utils/* uses the new nfc_device_get_name() function instead of access directly to struct's content;
- new error defined: NFC_ERFTRANS for notifying about RF transmission error, its used by mifare.c to detect permissions error on mifare;
- drivers initiator_transceive_bytes() function now returns libnfc's error code on failure (<0), and received bytes count on success (>=0);
- remove some unused errors.
2011-12-19 00:23:21 +00:00
Romuald Conty
9bdc20353c
nfc_device struct is not exposed as public API anymore (partial commit)
...
- split libnfc's errors and chip's errors
- fix nfc_property enum
2011-12-15 16:02:38 +00:00
Audrey Diacre
98355d36a7
nfc_initiator_init returns now error code and nfc_initiator_list_passive_targets returns now the number of targets found or error code.
2011-12-15 11:46:14 +00:00
Audrey Diacre
a615d969fd
nfc_properties replace now nfc_options and nfc_configure is replaced by nfc_device_set_property_bool which returns error code.
2011-12-14 16:01:00 +00:00
Romuald Conty
c181cb35ec
set correctly default timeout values
2011-12-14 15:03:29 +00:00
Romuald Conty
26b9c28f48
new properties to tune timeouts:
...
- add nfc_properties (will replace nfc_options)
- introduce some error codes
- rework functions to use the new timeout_command value
2011-12-14 13:27:11 +00:00
Romuald Conty
90c05c7d13
Add a printf-based logging when log4c is not available (I experiemented some bugs using log4c)
2011-12-07 14:59:40 +00:00
Romuald Conty
c286eec920
DEP enhancements:
...
- Add timeout on InJumpForDEP (pn53x) and initiator_select_dep (libnfc API)
- test_dep now works again (except 424Kbps)
- Fix ndi.ndm feeling when select a DEP target
Important: test_dep does not work on PN53x_USB devices after running previous tests
2011-12-06 10:05:35 +00:00
Romuald Conty
e76e531d2d
pn53x_usb: clean timeout handling.
2011-11-25 16:13:40 +00:00
Audrey Diacre
297a8566a0
Oups, too quick replacement commited in r1183
2011-11-25 15:47:24 +00:00
Audrey Diacre
52bc5853d8
Remove whitespace after star symbol for pointers
2011-11-25 15:21:10 +00:00
Audrey Diacre
5a9a778879
Remove whitespace after star symbol for pointers
2011-11-25 13:32:29 +00:00
Audrey Diacre
90b5961b40
Rename fixed_timeout to timeout_tv and cleam useless allocation.
2011-11-25 13:30:13 +00:00
Audrey Diacre
5c7454a2f7
Timeout is now integer.
2011-11-25 11:37:30 +00:00
Audrey Diacre
784a2f86a2
Change byte_t type to uint8_t (Fixes Issue 147)
2011-11-24 10:54:42 +00:00
Audrey Diacre
322eec6fb1
Define macro to cast to serial_port_unix.
2011-11-24 10:20:36 +00:00
Audrey Diacre
c718fafee7
Massive code clean up: (Fixes Issue 161)
...
- Remove typedef from internal structs
- Remove _t suffix from types
- Fix tests using connstrings
2011-11-23 15:55:40 +00:00
Anugrah Redja Kusuma
136cfdf48d
Implement driver for ACR122S device
2011-11-23 03:05:12 +00:00
Romuald Conty
63f168440b
Provide a (poor) logging capability when log4c is not available but DEBUG is enabled.
2011-10-27 15:14:18 +00:00
Romuald Conty
b4ebb4510d
Removes libusb types workaround (r200) as it seems to not be needed anymore but may disturb compiler.
2011-10-18 11:03:54 +00:00
Romuald Conty
55daa29a7c
Allow to connect to a device using a connection string:
...
- Provide a nfc_get_default_device() that allow to grab the connstring stored
in LIBNFC_DEFAULT_DEVICE environnement variable or returns the first
available device if not set;
- nfc_connect(NULL) now takes the default device (see
nfc_get_default_device());
- Removes nfc_driver_desc_t from public types
- Defines nfc_connstring as char[1024]
- examples/*: use nfc_connstring
- examples/nfc-poll: now uses only the default device (instead of all devices
availables)
- Removes parse_args() from nfc-utils.[hc]
2011-10-17 13:03:56 +00:00
Romuald Conty
dc842a844c
examples/nfc-read-forum-tag3: add new example to read a NFC Forum Tag Type 3
2011-10-10 00:40:34 +00:00
Romuald Conty
b24191a9b9
Fix compilation using cmake
2011-10-04 21:43:05 +00:00
Romuald Conty
8fa83ac70f
Fix infinite software polling
2011-10-04 21:42:06 +00:00
Romuald Conty
dccfd65c80
Add software polling for non-PN532 equipped device (Fixes Issue 136)
2011-10-03 11:19:08 +00:00
Romuald Conty
b1a30e3e3b
drivers/pn53x_usb: fix timeout computing
2011-10-03 08:59:21 +00:00
Romuald Conty
b2666dea15
windows port improved:
...
- PCSC headers/libs are not a requierement sif you dont select ACR122 driver
- uart_win32 implementation now handles timeouts
2011-10-01 14:50:53 +00:00
Romuald Conty
5ecf382dfc
windows: Oups... timeout is a pointer...
2011-10-01 09:59:27 +00:00
Romuald Conty
afd015f1b7
Attempt to provide a Windows implementation of timeouts handling in UART
2011-09-30 14:02:51 +00:00
Romain Tartiere
311d12feef
Make a copy of the provided timeout before calling select(2).
2011-09-29 15:01:48 +00:00
Romuald Conty
8f7834c625
drivers/arygon,pn532_uart,pn53x_usb: all PN53x commands are now cancelable
2011-09-29 14:53:52 +00:00
Romuald Conty
49ab6a7f31
raise up loggin level when PCSC context is not found (e.g. under POSIX system, pcscd is not running)
2011-09-29 11:59:34 +00:00
Romuald Conty
590e3910de
Document new timeout parameter
2011-09-29 09:49:08 +00:00
Romuald Conty
87c13825af
drivers/pn53x_usb: rework timeout usage
2011-09-22 16:21:22 +00:00
Romain Tartiere
481fb4943f
- Add timeout capablities to nfc_initiator_transceive_bytes(), nfc_target_send_bytes() and nfc_target_receive_bytes();
...
- Bump version to 1.5.1.
2011-09-22 13:03:47 +00:00
Romuald Conty
f6b582cf2b
windows: Remove DGB/WARN/ERROR obsolete macros usage.
2011-09-21 06:54:53 +00:00
Romuald Conty
e4524bc810
chips/pn53x: add RFConfiguration wrappers
2011-09-20 22:43:45 +00:00
Romuald Conty
b33fb81234
logging: fix LOG_CATEGORY and show the last command status.
2011-09-20 18:22:47 +00:00
Romuald Conty
cf99796a77
Removes semaphore.h depends.
2011-09-20 16:23:48 +00:00
Romuald Conty
ca8bd1df91
logging: remove semaphore usage since libnfc is not threaded and log4c does handle threaded cases itself. (Should ease Windows compiling)
2011-09-20 14:07:40 +00:00
Romain Tartiere
f6fc637d77
Soooo fragile :-))))
2011-09-12 17:05:00 +00:00
Romuald Conty
e8eec583ed
Enhance logging system:
...
* Removes internal DBG/WARN/ERR macros (but keep them in examples);
* Removes almost all DEBUG define references;
* Uses the flexible log4c library to log all messages.
2011-09-12 14:50:01 +00:00
Romuald Conty
fa7084fa77
removes the libusb-win32 workaround: libusb-win32 project released a new stable version which fixes the infinite timeout issue. (Thanks to Ergeerts Glenn)
2011-08-08 10:02:47 +00:00
Romuald Conty
676477e20c
rework the way to determine which command is needed to send/receive a frame as target.
2011-06-30 17:05:59 +00:00
Romain Tartiere
84918fd075
Fix invalid memory access when a new driver is probing for hardware and the number of requested devices was already reached.
...
The probing functions assume that at least one device should be found and
passed to the caller, and only after finding such a device they will check that
they should eventually stop looking for more devices. While we could make each
probing function capable of handling the special-case of finding 0 devices, it
is much more consistent to perform the check from the calling function.
2011-06-30 13:35:40 +00:00
Romuald Conty
fd19773c21
drivers/pn53x_usb: Make valgrind more happy :)
2011-06-28 14:05:40 +00:00
Romuald Conty
eec2794d2d
drivers/pn532_uart,arygon: Make valgrind happy with UART-based drivers
2011-06-28 13:16:44 +00:00
Romuald Conty
e6051ceca4
chip/pn53x: clean up SAMConfiguration usage.
2011-06-27 17:12:25 +00:00