Philippe Teuwen
bb5b712a74
Adding link to AUTHORS in the copyright headers
2013-07-17 13:57:56 +02:00
Philippe Teuwen
bf164220ee
Unify copyright notices & update authors lists
2013-03-10 16:15:23 +01:00
Alex Lian
7b917f9a8b
Windows: Clean up all compiler warnings and link warnings
...
- Fixed the suppression of the auto-fixup for linking against MS built libs
- Fixed all the formatting warnings by shifting to inttypes.h specifiers
- shifted to %lu for DWORD printf
2013-03-07 09:37:36 +01:00
Philippe Teuwen
73b5c9d0af
nfc_init() return rather than exit on malloc error, examples fixed accordingly
2013-03-05 22:24:59 +01:00
Philippe Teuwen
bece73faaf
Error conditions in utils & examples: fix leaks, unify style (see details)
...
* in main():
** errx()/err()/return -> exit()
** return values -> EXIT_SUCCESS & EXIT_FAILURE
* out of main:
** err()/errx()/exit() -> return
** change retval from size_t to int to allow returning errors
** don't use EXIT_SUCCESS / EXIT_FAILURE as retvals
* add nfc_close() & nfc_exit() to exit() on errors
* add missing fclose() on errors
* add missing test if (pnd == NULL)
* unify style if (pnd == / != NULL)
* remove goto's
* few related fixes
* remove if(pnd!=NULL) test on nfc_close() calls
2013-03-05 19:44:59 +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
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
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
Romain Tartiere
e9b2f5729c
Fix a bunch of warnings.
2012-05-14 13:47:31 +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
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
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
Romuald Conty
22bea8d99b
nfc_target_receive_*() need to know rx buffer size
2012-01-05 21:35:02 +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
5a1f0c2115
check result of nfc_initiator_init() function in examples/ and utils/
2012-01-05 10:33:50 +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
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
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
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
Audrey Diacre
784a2f86a2
Change byte_t type to uint8_t (Fixes Issue 147)
2011-11-24 10:54:42 +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
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
8c7b61eaba
move some examples to utils/ since they are not examples anymore :) (Fixes Issue 164)
2011-09-30 11:33:31 +00:00
Philippe Teuwen
96538d052b
Extend max length for firmware description & fix typo
2011-05-25 19:53:45 +00:00
Philippe Teuwen
a2a93e7224
nfc-relay: fix UID
2011-05-09 08:51:07 +00:00
Romuald Conty
dba06a555e
remove nfc-message.h usage from examples.
2011-03-05 08:53:46 +00:00
Romuald Conty
4384d27f3e
examples: silent some compilation warnings.
2011-02-28 09:47:31 +00:00
Romuald Conty
5e9e177319
Change examples license for the sake of consistency: LGPL covers library, re-usable examples code is now under BSD license.
2010-11-17 14:27:11 +00:00
Romuald Conty
a214974684
Remove INFO macro: display was not clear enough and does not provide a big benefit.
...
New Issue
Summary: Remove nfc-message.h file from installed ones
nfc-message.h provide some usefull debugging macros but I am not sure that these macros have to be installed with other files.
2010-10-26 14:27:17 +00:00
Romuald Conty
1f62e9e2f2
Improve API for target emulation, nfc_target_mode_t does not exist anymore (this mode is computed from nfc_target_t)
2010-10-15 14:32:10 +00:00
Romuald Conty
7c76e1bf32
nfc_target_init() now update nfc_target_t baud rate
2010-10-14 16:27:50 +00:00
Romuald Conty
979430ecd1
nfc_target_t have now nfc_modulation_t instead of nfc_modulatation_type_t
2010-10-13 19:17:51 +00:00
Romuald Conty
d289eabc36
Attempt to provide clean types for API
2010-10-13 17:43:23 +00:00
Romuald Conty
695e5c2f37
Rename nfc_target_type_t as pn53x_target_type_t
2010-10-13 15:31:48 +00:00
Romuald Conty
0fe30e3db7
Change some nfc_target_mode_t to insist on the restrictions offer these mode
2010-10-13 11:35:28 +00:00
Romuald Conty
d7bffac0e6
Fix const bytes notation, string notation will add EOL ('\0')
2010-10-12 14:02:53 +00:00
Philippe Teuwen
ddb8fe9b1f
nfc-relay: fix UID len & doc
2010-10-11 11:35:46 +00:00