Philippe Teuwen
7af127ac0d
pn53x-tamashell: allow larger commands up to full extended frame (264 bytes)
...
It was arbitrarily limited to MAX_FRAME_LEN-10 probably because of bug in LOG_HEX() fixed in previous commit
2013-02-21 22:36:23 +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
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
Nobuhiro Iwamatsu
50f5c610a1
Add man of nfc-emulate-forum-tag2 to the installation
...
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2013-02-01 01:57:47 +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
Ludovic Rousseau
109d496222
Compilation: Change the order of arguments
...
Put the -lnfc at the end of the command lie to avoid undefined
references on Ubuntu 12.04.
Close #219
2013-01-25 14:18:28 +01:00
Philippe Teuwen
9815ac728f
nfc-emulate-uid: fix BCC
2013-01-22 00:45:42 +01:00
Romuald Conty
cbdac66fa4
Add quick start examples compliation to "make check"
2013-01-18 16:05:43 +01:00
Romuald Conty
995368cffa
Update quick_start_examples
2012-12-05 02:05:16 +01:00
Romuald Conty
5b0e276572
Examples and utils are now updated to use the requiered nfc_context
2012-12-05 00:51:13 +01:00
Romuald Conty
3ee77eb79e
Fix *transceive*() calls from examples and utils (bug introduced in previous commit)
2012-11-24 13:00:23 +01:00
Philippe Teuwen
7437f76007
simplify quick_start_example1 and add quick_start_example2
2012-11-16 12:25:27 +01:00
Philippe Teuwen
6c7c0a6e63
ReadMobib: make it compatible with Basic card
2012-11-10 17:11:48 +01: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
Philippe Teuwen
6e7fdb1c80
Adds nfc-emulate-forum-tag2 man page
2012-09-19 10:25:33 +00:00
Romuald Conty
310d7eba07
New str_nfc_target() function in API.
...
This allow to convert a nfc_target struct into allocated string.
2012-09-17 13:47:54 +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
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
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
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
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
Ludovic Rousseau
48016fa297
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2012-05-18 07:38:42 +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
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
Ludovic Rousseau
d28889c696
Remove now useless #define for getline()
...
getline() is no more used. So no need to use this ugly hack.
This also solves a compiler warning;
In file included from ../libnfc/log.h:22:0,
from ../libnfc/chips/pn53x-internal.h:28,
from ../libnfc/chips/pn53x.h:31,
from pn53x-tamashell.c:68:
../config.h:153:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:165:0: note: this is the location of the previous definition
2012-05-15 07:57:37 +00:00
Philippe Teuwen
7597055f26
fix typos
2012-05-14 19:44:03 +00:00
Romain Tartiere
e9b2f5729c
Fix a bunch of warnings.
2012-05-14 13:47:31 +00:00
Romain Tartiere
2256d5d3dc
Fix usage of possibly uninitialized 'result'.
...
Can't tell how gcc/clang fail to detect this…
2012-05-14 12:50:04 +00:00
Ludovic Rousseau
a2b022609f
Fix some spelling mistakes
...
Closes Issue #196
2012-05-13 13:10:15 +00:00
Ludovic Rousseau
b5c1f2d619
Fix compiler warning
...
nfc-dep-initiator.c:54: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:54:37 +00:00
Ludovic Rousseau
6abb1c4eab
Fix compiler warning
...
nfc-dep-target.c:53: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:51:57 +00:00
Ludovic Rousseau
edefdf0157
Fix compiler warnings
...
nfc-emulate-forum-tag2.c:78: warning: no previous prototype for ‘stop_emulation’
nfc-emulate-forum-tag2.c:116: warning: no previous prototype for ‘nfcforum_tag2_io’
2012-05-13 12:50:30 +00:00
Ludovic Rousseau
72ad8f7ad5
Remove an explicit cast and fix a compiler warning
...
nfc-emulate-uid.c:125: warning: function declaration isn’t a prototype
2012-05-13 12:49:28 +00:00
Ludovic Rousseau
714997fc34
Fix compiler warnings
...
nfc-emulate-uid.c:70: warning: no previous prototype for ‘intr_hdlr’
nfc-emulate-uid.c:79: warning: no previous prototype for ‘print_usage’
2012-05-13 12:48:28 +00:00
Ludovic Rousseau
96b1643522
Remove an explicit cast and fix a compiler warning
...
nfc-emulate-tag.c:180: warning: function declaration isn’t a prototype
2012-05-13 12:46:33 +00:00
Ludovic Rousseau
a7325ffded
Fix compiler warnings:
...
nfc-emulate-tag.c:65: warning: no previous prototype for ‘intr_hdlr’
nfc-emulate-tag.c:76: warning: no previous prototype for ‘target_io’
nfc-emulate-tag.c:139: warning: no previous prototype for ‘nfc_target_emulate_tag’
2012-05-13 12:44:13 +00:00
Ludovic Rousseau
b65c133f80
stdin is already defined by stdio.h
...
Fix compiler warnings:
pn53x-tamashell.c: In function ‘main’:
pn53x-tamashell.c:79: warning: nested extern declaration of ‘__stdinp’
pn53x-tamashell.c:79: warning: redundant redeclaration of ‘__stdinp’
/usr/include/stdio.h:164: warning: previous declaration of ‘__stdinp’
was here
2012-05-13 12:42:51 +00:00
Ludovic Rousseau
e60f4ef870
Fix compiler warning
...
pn53x-tamashell.c:106: warning: initialization discards qualifiers from
pointer target type
2012-05-13 12:41:17 +00:00
Ludovic Rousseau
b3e21fecd2
Fix compiler warnings
...
nfc-poll.c:57: warning: no previous prototype for ‘stop_polling’
nfc-poll.c:67: warning: no previous prototype for ‘print_usage’
2012-05-13 12:39:17 +00:00
Ludovic Rousseau
da25554128
Remove an explicit cast and fix a compiler warning
...
nfc-relay.c:107: warning: function declaration isn’t a prototype
2012-05-13 12:38:18 +00:00
Ludovic Rousseau
43569e22e4
Fix compiler warnings
...
nfc-relay.c:65: warning: no previous prototype for ‘intr_hdlr’
nfc-relay.c:73: warning: no previous prototype for ‘print_usage’
2012-05-13 12:36:59 +00:00
Ludovic Rousseau
61ba0478cd
Fix compiler warning
...
pn53x-sam.c:56: warning: no previous prototype for ‘wait_one_minute’
2012-05-13 12:32:30 +00:00
Romuald Conty
3eba0e9b54
Prepare libnfc 1.6.0-rc1
2012-03-01 12:00:23 +00:00
Audrey Diacre
3d393e58a9
add some Doxygen documentation.
2012-01-31 09:49:43 +00:00
Audrey Diacre
26245add73
Merge libnfc-1.5-new-api branch to trunk (r1168:1303).
2012-01-25 09:56:05 +00:00
Audrey Diacre
5a475cf074
add some whitespaces
2012-01-20 09:17:38 +00:00
Audrey Diacre
4c011279ff
add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
2012-01-18 16:22:06 +00:00
Audrey Diacre
207199dc34
examples, test and utils use now nfc_exit() function.
2012-01-18 11:36:18 +00:00
Audrey Diacre
1d55b6f8c6
examples, test and utils use now nfc_init() function.
2012-01-18 11:09: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
Romain Tartiere
2d393bff91
Make these function accept no argument (instead of any).
2012-01-15 11:06:24 +00:00
Audrey Diacre
1ec504e163
nfc_list_devices() function returns now the number of devices found.
2012-01-10 10:35:36 +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
Audrey Diacre
c10b473361
rx buffer size parameter of pn53x_transceive() function is now a const size_t.
2012-01-09 10:24:00 +00:00
Romuald Conty
7df3bb5aeb
various minor fixes/enhancements
2012-01-06 13:08:16 +00:00
Romuald Conty
48e92149e4
drop log4c support
2012-01-06 13:05:10 +00:00
Romuald Conty
22bea8d99b
nfc_target_receive_*() need to know rx buffer size
2012-01-05 21:35:02 +00:00
Audrey Diacre
601105ef79
fix bad cast done in last revision.
2012-01-05 17:03:38 +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
81d76c8c70
check result of nfc_disconnect() function in examples/nfc-dep-initiator.c
2012-01-05 10:56:36 +00:00
Audrey Diacre
5a1f0c2115
check result of nfc_initiator_init() function in examples/ and utils/
2012-01-05 10:33:50 +00:00
Romuald Conty
125553c72e
verbose option back for nfc-list, and newly implemented in nfc-poll
2012-01-04 21:29:43 +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
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
Romuald Conty
d6477df7a6
doc: quick start example minor fix (make distcheck OK)
2011-12-22 17:40:22 +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
b864215d63
pn53x_initiator_poll_target() function returns now polled targets count on success.
2011-12-22 11:16:27 +00:00
Audrey Diacre
f93bc59504
nfc_initiator_select_passive_target() function returns now the selected passive targets count on success.
2011-12-21 11:33:21 +00:00
Audrey Diacre
c41d7de8ca
nfc_initiator_select_dep_target() function returns nox libnf error code and fix some uses of nfc_initiator_transceive_bytes() function.
2011-12-21 09:15:44 +00:00
Audrey Diacre
0f5cc5683d
nfc_initiator_poll_target() function returns now libnfc error code.
2011-12-20 15:46:35 +00:00
Audrey Diacre
9c5ec3c4e1
the following functions now return libnfc error code:
...
_pn53x_write_register()
_pn53x_WriteRegister()
_pn53x_transceive()
_pn53x_SAMConfiguration()
_pn53x_PowerDown()
_pn53x_InListPassiveTarget()
_pn53x_InDeselect()
_pn53x_InRelease()
_pn53x_RFConfiguration__*
2011-12-20 11:25:33 +00:00
Audrey Diacre
103485518c
nfc_initiator_select_passive_target() function returns now libnfc error code.
2011-12-19 16:27:50 +00:00
Audrey Diacre
ba2a7cfe2e
nfc_target_init() function returns now 0 on succes and libnfc error code on failure.
2011-12-19 15:35:37 +00:00
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
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
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
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
Audrey Diacre
3b657ee547
quick_start_example1 is now compiled when running make check or distcheck (Fixes Issue 178)
2011-11-30 11:21:01 +00:00
Audrey Diacre
52bc5853d8
Remove whitespace after star symbol for pointers
2011-11-25 15:21:10 +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
ce846931bc
Move nfc-emulate-forum-tag2 from utils to examples.
2011-11-24 10:27:02 +00:00