Philippe Teuwen
6ab3c368b8
nfc-emulate-uid: remove unreachable code and add proper cleaning when interrupted
2014-03-04 01:41:01 +01:00
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
Philippe Teuwen
4822bb3e42
Fix bug introduced in some signal traps where context was not declared
2013-03-05 23:58:35 +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
Philippe Teuwen
9815ac728f
nfc-emulate-uid: fix BCC
2013-01-22 00:45:42 +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
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
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
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
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
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
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
8c7b61eaba
move some examples to utils/ since they are not examples anymore :) (Fixes Issue 164)
2011-09-30 11:33:31 +00:00
Romuald Conty
651d88fd15
examples/nfc-anticol: now use nfc_abort_command()
2011-05-05 14:24:27 +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
fa4f6ca2ad
nfc-emulate-uid: nfc_target_init() needs a emulable UID at first. (Fixes Issue 143)
2011-02-04 17:43:36 +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
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
Philippe Teuwen
5a5b5d681b
Small typos
2010-10-14 11:53:27 +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
Philippe Teuwen
9d1e72a9f7
pn53x_usb: leave the device in cleaner state (Fixes Issue 123)
2010-10-12 15:51:57 +00:00
Romuald Conty
202c2a7a8b
nfc-emulate-uid: fix wrong UID length in initial nfc_target_t
2010-10-12 14:04:30 +00:00
Philippe Teuwen
7128eabfad
Examples: misc fixed & enhancements in the doc
2010-10-08 19:24:54 +00:00
Romuald Conty
79ebce2549
examples: rename nfc-emulate to nfc-emulate-uid.
...
Add some code documentation.
Update man page.
2010-10-08 14:05:10 +00:00