Philippe Teuwen
bf164220ee
Unify copyright notices & update authors lists
2013-03-10 16:15:23 +01:00
Philippe Teuwen
cc03f84636
New connstring_decode() fix cppcheck warning "Non reentrant function 'strtok' called"
2013-03-10 00:20:52 +01:00
Alex Lian
c72846e3c6
Convert by value passing of nfc_target to pointer for str_nfc_target and nfc_initiator_target_is_present
...
This becomes more consistent with all other pass by pointer of most structures.
Additionally, this should lessen stack memory usage, as building strings with str_nfc_target would push the target (283 bytes) plus then a copy of the info objects (up to 275) onto the stack as it dives into the sprintf functions.
Lastly, this makes my attempt at a .NET wrapper easier, as I can make passing by pointer work, but passing by value seems to bomb on the interop right now.
2013-03-07 09:16:33 +01:00
Philippe Teuwen
1682a86166
Add driver-dependent PowerDown
2013-01-31 01:15:03 +01:00
Philippe Teuwen
04a7d2a3ba
Allow device.optional=true to tolerate missing device
2013-01-18 22:54:44 +01:00
Romuald Conty
82c41b4fc1
Fixes style: make style
2012-12-09 20:09:55 +01:00
Romuald Conty
84dc268781
New feature: user can define a device by conf file.
2012-12-05 00:51:13 +01:00
Romuald Conty
9b3947b8ed
Improves log feature:
...
* Add --disable-log
* Add a log level filter, configurable using conf file (ie. /etc/nfc/libnfc.conf) or environment var LIBNFC_LOG_LEVEL
2012-11-26 21:02:03 +01:00
Romuald Conty
7963fdfc3b
Import code to load configuration from file.
...
WARNING: This commit do not contains a fully cleaned code:
- Only nfc-list have been tested
- Some -commented- code is not used ATM
- Some printf-as-debug remain in this commit
... but that a bit usable so... happy hacking ;-)
2012-11-24 13:10:52 +01:00
Philippe Teuwen
fda8d60ce0
Adapt *transmit_bytes_timed API to be closer to *transmit_bytes
2012-11-12 16:54:03 +01:00
Romuald Conty
397222c33f
Removes --enable-serial-autoprobe option at compile and replace this feature by LIBNFC_INTRUSIVE_SCAN environment variable at run time.
2012-10-21 14:11:38 +00:00
Romuald Conty
b5aa91fd62
Use a more appropriated term regarding device detection: from probe to scan
...
- Rename nfc-probe to nfc-scan-device
- Rename internal drivers function prototypes: _probe to _scan
- Revamp _scan function prototype: it now returns device found count
2012-10-21 14:11:17 +00:00
Romuald Conty
9afa3c6598
Use copyright format recommended by GNU project.
...
http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
2012-10-21 14:09:16 +00:00
Romuald Conty
1f0ec1b43a
Remove unused macro. (Fixes Issue 192)
2012-09-27 07:36:02 +00:00
Romuald Conty
de827ab583
nfc_device_get_information_about() now allocates returned string.
...
Note: must be freed by free().
2012-09-17 13:47:30 +00:00
Romuald Conty
b4ef1a3a5d
New nfc_initiator_init_secure_element() function to set SAM as wired card (only relevant with a PN532 SAM-equipped)
2012-06-04 00:16:28 +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
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
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
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
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
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
Romuald Conty
e7f85811a1
fix *get_supported_modulation and *get_supported_baud_rate protos in nfc_driver and public ones.
2012-03-01 13:52:51 +00:00
Audrey Diacre
5a5bdf1d66
add nfc_device_get_supported_modulation() and nfc_device_get_supported_baud_rate() functions.
2012-02-17 12:09:56 +00:00
Audrey Diacre
26245add73
Merge libnfc-1.5-new-api branch to trunk (r1168:1303).
2012-01-25 09:56:05 +00:00
Romuald Conty
b366b8c027
add nfc_device_get_connstring() function and nfc-probe example to show devices connection strings
2012-01-18 13:17:01 +00:00
Audrey Diacre
324af418db
rename nfc_connect() function to nfc_open().
2012-01-17 15:21:56 +00:00
Audrey Diacre
9eb37b3eee
rename nfc_disconnect() function to nfc_close().
2012-01-17 14:52:39 +00:00
Audrey Diacre
9d3ca39a44
remove _t suffix from nfc_driver_t type.
2012-01-17 14:17:01 +00:00
Audrey Diacre
00818e048c
rx buffer size parameter of nfc_target_init() function is now a const size_t.
2012-01-09 11:26:57 +00:00
Romuald Conty
22bea8d99b
nfc_target_receive_*() need to know rx buffer size
2012-01-05 21:35:02 +00:00
Audrey Diacre
642f9a38f7
nfc_target_receive_bytes() function does not now use pszRx as parameter because this function returns it.
2012-01-05 16:33:55 +00:00
Audrey Diacre
7e7ee3299e
nfc_target_receive_bits() function does not now use pszRxBits as parameter because this function returns it.
2012-01-05 15:50:07 +00:00
Audrey Diacre
239fd750c4
add timeout on nfc_target_init() and this function returns now received bytes count on success.
2012-01-05 15:10:11 +00:00
Audrey Diacre
c80ebdca25
nfc_abort_command() function returns now 0 on success and libnfc error code on failure and fix some warnings.
2012-01-05 14:49:02 +00:00
Audrey Diacre
4b373263e4
pn53x_idle() returns now 0 on success and libnfc error code on failure.
2012-01-04 16:26:57 +00:00
Audrey Diacre
a41b2b0da8
nfc_initiator_transceive_bytes_timed() function does not now use pszRx as parameter because this function returns it.
2012-01-04 15:53:41 +00:00
Audrey Diacre
b699743973
nfc_initiator_transceive_bits_timed() function does not now use pszRxBits as parameter because this function returns it.
2012-01-04 15:43:08 +00:00
Audrey Diacre
6e7092b160
nfc_initiator_transceive_bits() function does not now use pszRxBits as parameter because this function returns it.
2012-01-04 15:30:42 +00:00
Audrey Diacre
0de1136037
nfc_target_receive_bits() function returns now received bits count on success and libnfc error code on failure.
2012-01-04 13:33:53 +00:00
Audrey Diacre
951dde8143
nfc_target_send_bits() function returns now sent bits count on success and libnfc error code on failure.
2012-01-04 13:27:15 +00:00
Audrey Diacre
1c49329ffa
nfc_initiator_transceive_bits_timed() function returns now received bits count on success and libnfc error code on failure.
2012-01-04 13:18:11 +00:00
Audrey Diacre
d02da0db64
nfc_initiator_transceive_bytes_timed() function returns now received bytes count on success and libnfc error code on failure.
2012-01-04 11:54:55 +00:00
Audrey Diacre
61074f3497
nfc_initiator_transceive_bits() function returns now received bits count on success and libnfc error code on failure.
2012-01-04 11:46:07 +00:00
Audrey Diacre
9c1371dcca
nfc_target_send_bytes() function returns now sent bytes count on success and libnfc error code on failure.
2011-12-22 15:59:08 +00:00
Audrey Diacre
ac6f652368
nfc_target_receive_bytes() function returns now received bytes count on success and libnfc error code on failure.
2011-12-22 15:39:51 +00:00
Audrey Diacre
ff066e394d
nfc_initiator_deselect__target() function returns now libnf error code.
2011-12-21 09:53:16 +00:00