Commit graph

32 commits

Author SHA1 Message Date
Ludovic Rousseau
565134d4c4 Add missing \n in a printf() 2013-08-31 17:59:24 +02:00
Ludovic Rousseau
7d986844c4 Fix compiler warnings
doc/quick_start_example1.c:24: warning: unused parameter ‘argc’
doc/quick_start_example2.c:21: warning: unused parameter ‘argc’
2013-04-03 17:55:40 +02:00
Philippe Teuwen
ecc12d28aa quick_start_example1.c: avoid using warnx() to remove err.h dependency
err.h is not available under Windows and the goal of this example is not to learn how to get around that problem ;)
2013-03-12 17:46:04 +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
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
Romuald Conty
995368cffa Update quick_start_examples 2012-12-05 02:05:16 +01:00
Philippe Teuwen
7437f76007 simplify quick_start_example1 and add quick_start_example2 2012-11-16 12:25:27 +01: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
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
Audrey Diacre
3d393e58a9 add some Doxygen documentation. 2012-01-31 09:49:43 +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
5a1f0c2115 check result of nfc_initiator_init() function in examples/ and utils/ 2012-01-05 10:33:50 +00:00
Romuald Conty
d6477df7a6 doc: quick start example minor fix (make distcheck OK) 2011-12-22 17:40:22 +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
103485518c nfc_initiator_select_passive_target() function returns now libnfc error code. 2011-12-19 16:27:50 +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
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
Philippe Teuwen
96538d052b Extend max length for firmware description & fix typo 2011-05-25 19:53:45 +00:00
Philippe Teuwen
4124dc662d Cleanup of initializations 2011-05-05 10:12:26 +00:00
Romuald Conty
dba06a555e remove nfc-message.h usage from examples. 2011-03-05 08:53:46 +00:00
Romuald Conty
6f3fbcb6bf Fix nfc_dep_mode_t usage in API, fix/improve documentation 2010-10-14 11:12:23 +00:00
Romuald Conty
9020014160 Rename nfc_modulation_t as pn53x_modulation_t 2010-10-13 15:39:52 +00:00
Romuald Conty
7be31d0ba8 Update documentation and associated example. 2010-09-08 09:16:24 +00:00
Romuald Conty
18cc86a613 Indent whole code using make indent. (Fixes issue 84). 2010-09-07 17:51:03 +00:00
Romuald Conty
2688de6500 API change: nfc_initiator_select_tag() is now nfc_initiator_select_passive_target() AND nfc_initiator_deselect_tag() is now nfc_initiator_deselect_target() 2010-07-21 10:37:37 +00:00
Emanuele Bertoldi
d593a8e4c9 Added use of nfc-messages. 2010-06-16 09:48:26 +00:00
Romain Tartiere
c7d77d7664 Rearrange source code. 2010-04-07 14:37:19 +00:00